Re: Preempt? (was Re: Cannot enable DMA on SATA drive (SCSI-libsata,VIA SATA))

From: Nick Piggin
Date: Tue Oct 05 2004 - 20:29:34 EST


Jeff Garzik wrote:
Roland Dreier wrote:

Jeff> I strongly recommend disabling kernel preemption. It is a
Jeff> hack that hides bugs.

Why do you say that? Preempt seems to be the cleanest way to low
latency, and if anything it exposes locking bugs and races rather than
hiding anything.


Clean? Hardly. It breaks up code paths that were never written to be broken up.

But lots of things change. Unserialising the kernel broke code paths.

The proper fix is to locate and fix high latency code paths. Preempt does nothing but hide those high latency code paths, and discourage people from seeking a better solution.

Fix the drivers, rather than bandaid over them with preempt.

If all code paths in the kernel were low latency, then you would not need preempt at all.


When you say low latency, you mean small lock hold times, *and*
cond_rescheds placed everywhere - it is this second requirement
that isn't the cleanest way of doign things.

With preempt, sure you still need small lock hold times. No big
deal.
-
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/