Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread David Howells
Arjan van de Ven <[EMAIL PROTECTED]> wrote: > On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: > > Any sense of how costly it is to use spin_lock_irq's vs spin_lock > > (across different architectures) ? Isn't rwsem used very widely ? > > oh also rwsems aren't used all that much

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Suparna Bhattacharya
On Wed, Mar 09, 2005 at 12:21:01PM +0100, Andi Kleen wrote: > Arjan van de Ven <[EMAIL PROTECTED]> writes: > > > On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: > >> Any sense of how costly it is to use spin_lock_irq's vs spin_lock > >> (across different architectures) ? Isn't

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > spin_lock_irq() is OK for down_*(), since down() can call schedule() anyway. > > spin_lock_irqsave() should be used in up_*() and I guess down_*_trylock(), > although the latter shouldn't need to go into the slowpath anyway. That's what I've done. I'm

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andrew Morton
Arjan van de Ven <[EMAIL PROTECTED]> wrote: > > On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: > > Any sense of how costly it is to use spin_lock_irq's vs spin_lock > > (across different architectures) > > on x86 it makes a difference of maybe a few cycles. At most. > However

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andi Kleen
Arjan van de Ven <[EMAIL PROTECTED]> writes: > On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: >> Any sense of how costly it is to use spin_lock_irq's vs spin_lock >> (across different architectures) ? Isn't rwsem used very widely ? > > oh also rwsems aren't used all that much

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andi Kleen
Arjan van de Ven <[EMAIL PROTECTED]> writes: > On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: >> Any sense of how costly it is to use spin_lock_irq's vs spin_lock >> (across different architectures) > > on x86 it makes a difference of maybe a few cycles. At most. > However please

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andi Kleen
Suparna Bhattacharya <[EMAIL PROTECTED]> writes: > Any sense of how costly it is to use spin_lock_irq's vs spin_lock > (across different architectures) ? Isn't rwsem used very widely ? On P4s cli/sti is quite costly, let's says 100+ cycles. That is mostly because it synchronizes the CPU partly.

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Arjan van de Ven
On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: > Any sense of how costly it is to use spin_lock_irq's vs spin_lock > (across different architectures) ? Isn't rwsem used very widely ? oh also rwsems aren't used all that much simply because they are quite more expensive than regular

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Arjan van de Ven
On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: > Any sense of how costly it is to use spin_lock_irq's vs spin_lock > (across different architectures) on x86 it makes a difference of maybe a few cycles. At most. However please consider using spin_lock_irqsave(); the _irq() variant,

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andrew Morton
Suparna Bhattacharya <[EMAIL PROTECTED]> wrote: > > Any sense of how costly it is to use spin_lock_irq's vs spin_lock > (across different architectures) ? Isn't rwsem used very widely ? It's only on the slow path, and we've already done a bunch of atomic ops and a schedule()/wakeup() anyway. -

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Suparna Bhattacharya
Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very widely ? Regards Suparna On Wed, Mar 09, 2005 at 10:33:58AM +, David Howells wrote: > Andrew Morton <[EMAIL PROTECTED]> wrote: > > > If we want to take the spinlock

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Suparna Bhattacharya
Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very widely ? Regards Suparna On Wed, Mar 09, 2005 at 10:33:58AM +, David Howells wrote: Andrew Morton [EMAIL PROTECTED] wrote: If we want to take the spinlock from

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andrew Morton
Suparna Bhattacharya [EMAIL PROTECTED] wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very widely ? It's only on the slow path, and we've already done a bunch of atomic ops and a schedule()/wakeup() anyway. - To

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Arjan van de Ven
On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) on x86 it makes a difference of maybe a few cycles. At most. However please consider using spin_lock_irqsave(); the _irq() variant,

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Arjan van de Ven
On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very widely ? oh also rwsems aren't used all that much simply because they are quite more expensive than regular

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andi Kleen
Suparna Bhattacharya [EMAIL PROTECTED] writes: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very widely ? On P4s cli/sti is quite costly, let's says 100+ cycles. That is mostly because it synchronizes the CPU partly. The

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andi Kleen
Arjan van de Ven [EMAIL PROTECTED] writes: On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) on x86 it makes a difference of maybe a few cycles. At most. However please consider

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andi Kleen
Arjan van de Ven [EMAIL PROTECTED] writes: On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very widely ? oh also rwsems aren't used all that much simply

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Andrew Morton
Arjan van de Ven [EMAIL PROTECTED] wrote: On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) on x86 it makes a difference of maybe a few cycles. At most. However please consider

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread David Howells
Andrew Morton [EMAIL PROTECTED] wrote: spin_lock_irq() is OK for down_*(), since down() can call schedule() anyway. spin_lock_irqsave() should be used in up_*() and I guess down_*_trylock(), although the latter shouldn't need to go into the slowpath anyway. That's what I've done. I'm just

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread Suparna Bhattacharya
On Wed, Mar 09, 2005 at 12:21:01PM +0100, Andi Kleen wrote: Arjan van de Ven [EMAIL PROTECTED] writes: On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very

Re: aio stress panic on 2.6.11-mm1

2005-03-09 Thread David Howells
Arjan van de Ven [EMAIL PROTECTED] wrote: On Wed, 2005-03-09 at 16:34 +0530, Suparna Bhattacharya wrote: Any sense of how costly it is to use spin_lock_irq's vs spin_lock (across different architectures) ? Isn't rwsem used very widely ? oh also rwsems aren't used all that much simply