[Linux-cluster] no a storage question
Raz Ben-Jehuda(caro)
raziebe at gmail.com
Tue Dec 6 10:21:09 UTC 2005
i know this not the place, but since they so many kernel developers here...
i have a different question regarding locking in the kernel.
In the last issue of linux magazine there was an article about
locking. it presented the follwing scenario.
spin_lock(lock)
...
spin_unlock(lock).
In uni processot mahcine with preemption enabled.
spin_lock saves flags and cli(). spin_unlock() push flags out ( for nesting
interrupts)
they said that this code :
Does not protect preemption.
no protection from preemption ? How ?
How can process B get some cpu while process A had disabled interrupts,
no scheduling (unwillingly ) can be made.Prior to the preemption the
kernel scehdular must run and set Process B as the one to run , and to the
best my knowledge, a schedular runs only in timer interrupt.
Or is it possible that the schduler timer routine isn't running in interrupt
context ?
thank you
--
Raz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20051206/69f1af08/attachment.htm>
More information about the Linux-cluster
mailing list