All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2: Order concurrent AIO requests on the	same unallocated cluster
Date: Tue, 01 Sep 2009 12:50:12 +0200	[thread overview]
Message-ID: <4A9CFC64.7050603@redhat.com> (raw)
In-Reply-To: <4A9CF517.30701@redhat.com>

Avi Kivity schrieb:
> On 08/31/2009 05:48 PM, Kevin Wolf wrote:
>> When two AIO requests write to the same cluster, and this cluster is
>> unallocated, currently both requests allocate a new cluster and the second one
>> merges the first one when it is completed. This means an cluster allocation, a
>> read and a cluster deallocation which cause some overhead. If we simply let the
>> second request wait until the first one is done, we improve overall performance
>> with AIO requests (specifially, qcow2/virtio combinations).
>>
>> This patch maintains a list of in-flight requests that have allocated new
>> clusters. A second request touching the same cluster is limited so that it
>> either doesn't touch the allocation of the first request (so it can have a
>> non-overlapping allocation) or it waits for the first request to complete.
>>    
> 
> Can't this cause an even/odd pattern where all even-numbered requests 
> run first, then all the odd-numbered requests?
> 
> (0 goes to disk, 1 depends on it, 2 depends on 1, which isn't allocating 
> now, so it goes to disk, 3 depends on 2, ...)

I guess it can happen in theory, not sure if it matters in practice. You
are worried about image fragmentation? I think we could do something
about it with a cleverer cluster allocation.

However, I don't think it's an argument against this patch. What
currently happens isn't much better: Allocate n clusters, free n-1.
Almost as good in producing fragmentation.

> Do you have performance numbers?

No really detailed numbers. Installation time for RHEL on qcow2/virtio
went down from 34 min to 19 min, though.

Kevin

  reply	other threads:[~2009-09-01 10:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-31 14:48 [Qemu-devel] [PATCH] qcow2: Order concurrent AIO requests on the same unallocated cluster Kevin Wolf
2009-09-01 10:19 ` Avi Kivity
2009-09-01 10:50   ` Kevin Wolf [this message]
2009-09-01 11:24     ` Avi Kivity
2009-09-01 11:26       ` Gleb Natapov
2009-09-01 12:29         ` Kevin Wolf
2009-09-01 12:53           ` Avi Kivity
2009-09-01 13:15             ` Kevin Wolf
2009-09-01 11:43       ` Kevin Wolf
2009-09-01 11:55         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9CFC64.7050603@redhat.com \
    --to=kwolf@redhat.com \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.