On Tue, Aug 5, 2008 at 2:02 AM, Rene Herman <rene.herman@xxxxxxxxxxxx> wrote:
On 04-08-08 17:36, Peter Teoh wrote:
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.
With ref to Thomas Gleixner presentation:
http://www.kernel.org/pub/linux/kernel/people/tglx/preempt-rt/rtlws2006.pdf
page 8:
a. What is the difference between rtmutex and normal mutex? Basically the features of these mutex is just an atomic check on some
variables, and followed by looking the scheduling queues for any runnable tasks, correct? As for the difference, I suspect it is
just to make mutex more preemptible, so as to reduce latency (at the
cost of slower performance). Correct?
So the reason why spinlock have to disable interrupt, are reasons as given above.
But if now without interrupt disabled on the same CPU, then the scenario as described above will not happen as well, because, the 2nd
spinlock processing in interrupt mode, will itself be interrupted, and CPU execution returned back to the process context.
So no problem right? Just want to know if my logic has any bugs, thanks.
-- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ