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

From: Nick Piggin
Date: Tue Oct 05 2004 - 21:42:09 EST


Robert Love wrote:
On Tue, 2004-10-05 at 21:55 -0400, Jeff Garzik wrote:


As opposed to fixing drivers??? Please fix the drivers and code first.


No, definitely not, dude. Fixes for anything--drivers include--is never
superseded by anything else, even the eternal quest for "low latency."


sprinkling cond_resched() hacks all over the kernel.

cond_resched() is not the only solution.


Indeed. Most other solutions (fixing algorithms, lowering lock hold
time) have "automatic" benefits with kernel preemption, though, and that
has been what I have always advocated.


Well, but then without preempt, you *still* need to put cond_rescheds
in non-critical-section code. So cond_resched really does seem to be
the only solution (other than preempt).

I think this is why Ingo found he needed a check in might_sleep to get
really good latency (again, I could be wrong here as I haven't been
really following the progress of that work). But imagine when you
unwind *that* hack into the callers. Yuck.
-
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/