On Thursday 23 October 2003 18:23, Jens Axboe wrote:
On Thu, Oct 23 2003, Daniel Phillips wrote:
I'm specifically interested in working out the issues related to stackedThat needs something to hold the state in, and a bio per device. As
virtual devices, and there are many. Let me start with an easy one.
Consider a multipath virtual device that is doing load balancing and
wants to handle write barriers efficiently, not just allow the
downstream queues to drain before allowing new writes. This device
wants to send a write barrier to each of the downstream devices,
however, we have only one write request to carry the barrier bit. How
do you recommend handling this situation?
they complete, mark them as such. When they all have completed, barrier
is done.
That's just an idea, I'm sure there are other ways. Depending on how
complex it gets, it might not be a bad idea to just let the queues drain
though. I think I'd prefer that approach.
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.
Assuming this is worth doing, how do we issue N barriers to the downstream devices when we have only one incoming barrier write?