Re: [PATCH] ide write barrier support

From: Helge Hafting
Date: Fri Oct 24 2003 - 04:28:00 EST


On Thu, Oct 23, 2003 at 07:20:39PM +0200, Daniel Phillips wrote:
> These are essentially the same, they both rely on draining the downstream
> queues. But if we could keep the downstream queues full, bus transfers for
> post-barrier writes will overlap the media transfers for pre-barrier writes,
> which would seem to be worth some extra effort.
>
> To keep the downstream queues full, we must submit write barriers to all the
> downstream devices and not wait for completion. That is, as soon as a
> barrier is issued to a given downstream device we can start passing through
> post-barrier writes to it.
>
This approach may fail:

a. Some pre-barrier writes go to all devices
b. barrier is sent to all devices
c. Post-barrier writes go to all devices
d. drive 1 commits all its pre-barrier writes, then
commits its post-barrier writes.
e. drive 2 is slow and havent done the pre-barrier writes yet
f. power is lost - leaving inconsistent devices.

The problem is that drive 1 don't know wether drive 2
did the barrier yet.

Helge Hafting
-
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/