Re: question about preempt_disable()

From: Rob Love
Date: Sun Nov 30 2003 - 22:55:03 EST


On Sun, 2003-11-30 at 12:39, Matthias Urlichs wrote:

> You need to prevent deadlocks. Imagine process A grabbing a spinlock, then
> getting preempted. Process B now sits there and waits on the spinlock.
> Forward progress may or may not happen when the scheduler preempts B and
> restarts A, some indeterminate time later.

Further, on uniprocessor systems, we don't have deadlocks so it is the
preempt_disable() that actually ensures concurrency is prevented in the
critical region.

Rob Love


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/