login
Header Space

 
 

Re: Spinlocks waiting with interrupts disabled / preempt disabled.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Peter Zijlstra <a.p.zijlstra@...>
Cc: Ingo Molnar <mingo@...>, Christoph Lameter <clameter@...>, <linux-kernel@...>
Date: Friday, May 9, 2008 - 4:01 pm

Peter Zijlstra writes:



Ouch.  Given the possibility of something like this:

    thread A                thread B
    read_lock         
                            write_lock -- attempt, will spin
    read_lock -- recursive

we'd have to deal with not having the write be a barrier to the
recursive read_lock, yet a barrier to a new read_lock.  That's not
possible without keeping track of read_lock owners, which would
greatly complicate the locks.

IMHO recursive locking is moderately evil at the best of time, but if
it's there, its there.  (And if it's necessary, it has to be allowed.)





Now that is good news.

-- 
Olaf Weber                 SGI               Phone:  +31(0)30-6696752
                           Veldzigt 2b       Fax:    +31(0)30-6696799
Technical Lead             3454 PW de Meern  Vnet:   955-7151
Storage Software           The Netherlands   Email:  olaf@sgi.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Spinlocks waiting with interrupts disabled / preempt dis..., Olaf Weber, (Fri May 9, 4:01 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Mon Jun 23, 2:20 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Mon Jun 23, 4:45 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Wed Jun 25, 10:51 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Mon Jul 7, 4:14 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Tue Jul 8, 1:57 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Tue Jul 8, 11:58 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Mon Jul 7, 11:53 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Mon Jul 7, 11:56 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Thu Jun 26, 1:02 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Thu Jun 26, 11:49 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Fri May 9, 12:28 pm)
speck-geostationary