On 04-08-08 17:36, Peter Teoh wrote:
I read about this sleeping spin lock:
http://lwn.net/Articles/271817/
What is that?
A marketing oxymoron in the same style as, say, "voluntary preemption".
Ofcourse, "sleeping spinlocks" do not exist. Although adaptive spinlocks
which spin for a while before giving up and going to sleep might sort of
deserve the name, it's still no longer a spinlock if it goes to sleep
(and adaptive spinlocks might be the current -rt thing or not, I don't
know).
I don't quite understand. Normal spin lock is poll-based, but
sleeping spin lock is not, then how does it differed from mutex then?
In principle, they do not. I've never looked at the RT stuff in detail
but I believe that in practice, it's specifically an _RT_ mutex, which
features priority inversion avoidance over regular mutexes.
Note that the -rt kernel for example also makes interrupt handlers
scheduled entities (ie, they run alongside anything else and are just
part of the normal locking dance) so the locking rules and what you can
and cannot do change significantly under -rt. Understanding how and when
these "sleeping spinlocks" are safe requires a fuller digging into the
specifics of -rt therefore.
If you do, be sure to post back the full story... ;-/
Rene.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ