Re: elevator code in kernel

From: Stephen C. Tweedie (sct@redhat.com)
Date: Mon May 01 2000 - 09:19:39 EST


Hi,

On Fri, Apr 28, 2000 at 04:19:20PM -0700, Kip Matthew Macy wrote:
> Is it necessary for the elevator sorting code to be hard-coded into the
> kernel?

Not necessary, but highly desirable.

> Elevator sorting offers little or no benefit to higher performance I./O
> devices - An
> extreme example would be RAID controllers that have on card memory that
> can do
> reordering more intelligently themselves.

True, but only if the memory survives a reboot. However, even in
these situations, the elevator serves a useful purpose --- it allows
us to merge adjacent IO requests together in the queue, letting us
reduce the number of hardware IOs we generate. That is still good
for performance, as it reduces the CPU cost of the driver and may
allow for significantly faster throughput between memory and the
IO adapter.

> A more general example would
> be a typical
> IDE drive with a 2MB buffer that automatically reorders writes to
> minimize head
> movement.

Enabling write-behind on such drives is broken. You _have_ to have
such a system set to write-through, because otherwise, the drive ends
up promising data is hard on disk before it is actually committed to
oxide, and so on a reboot you can get data corruption. Anything which
uses ordered writes --- databases, mail spools, journaled filesystems
--- can and will be corrupted if you enable write-behind on an IDE
drive.

--Stephen

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



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:08 EST