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
-- Linux-cluster@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cluster