Re: solid state drive access and context switching

From: Alan Cox
Date: Mon Dec 03 2007 - 18:10:58 EST


> Given a fast low-latency solid state drive, would it ever be beneficial
> to simply wait in the kernel for synchronous read/write calls to
> complete? The idea is that you could avoid at least two task context
> switches, and if the data access can be completed at less cost than
> those context switches it could be an overall win.

In certain situations theoretically yes, the kernel is better off
continuing to poll than switching to the idle thread. You can do this to
some extent in a driver already today - just poll rather than sleeping
but respsect the reschedule hints and don't do it with irqs masked.

> Has anyone played with this concept?

For things like SATA based devices they aren't that fast yet.

Alan
--
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/