[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight A
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight AIO operation |
Date: |
Mon, 14 Jan 2013 14:28:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Il 14/01/2013 13:56, Stefan Hajnoczi ha scritto:
>> > + /* Wait for I/O to this cluster (from a previous iteration) to be
>> > done. */
>> > + while (test_bit(cluster_num, s->in_flight_bitmap)) {
>> > + trace_mirror_yield_in_flight(s, sector_num, s->in_flight);
>> > + qemu_coroutine_yield();
>> > }
> in_flight_bitmap is never set in this patch. Either you'll set it in a
> later patch or this is a bug?
Yes, this must be a rebase bug. Good catch. I'll send an updated
series tomorrow.
> Why can we get away with testing only cluster_num and not all bits up to
> and including cluster_num + nb_chunks? Is there an assumption that
> requests are issued in ascending order?
As of this patch, cluster_num is either a single granularity-sized
cluster or it is rounded to include a full image cluster. If it is
rounded, any other concurrent operation will do the same rounding and
set the bit corresponding to cluster_num.
In the next patch, the same applies when each granularity-sized cluster
is added to the current operation (either alone, or rounded to include a
full image cluster).
I'll add a comment.
Paolo