Re: 2.4.18 Preempt Freezeups

Robert Love (rml@tech9.net)
15 Mar 2002 14:11:49 -0500


On Fri, 2002-03-15 at 11:11, Mikael Pettersson wrote:

> "more than likely": that's perhaps true for your average NIC/soundcard/
> whatever driver, but things that poke the processor itself (like my
> performance-monitoring counters driver) really do depend on not being
> preempted. In my view, CONFIG_SMP is a minor triviality compared to
> CONFIG_PREEMPT ...

If you "poke the processor", to be SMP-safe, you should hold a lock to
prevent multiple concurrent "pokings of the processor" - thus you become
preempt-safe.

It is a rare case where something does not hold lock, assumes some sort
of non-reentrancy/concurrency, and is actually still SMP-safe. The only
nontrivial case I have seen is drivers that call disable_irq(n) and thus
are assured they won't have another driver request and then go off to
touch hardware.

In general, the sort of "non-preemptibility" you are requiring is also a
requirement for non-reentrancy and non-concurrency and thus your
measures to protect those (SMP locking, et al) assure you your
preempt-kernel protection, too.

Robert Love

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