From: Christoph Hellwig <hch@lst.de>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] fix bdrv_read/write_em and qemu_aio_flush
Date: Sat, 30 May 2009 12:08:42 +0200 [thread overview]
Message-ID: <20090530100842.GA28053@lst.de> (raw)
In-Reply-To: <20090528163309.GJ20464@random.random>
On Thu, May 28, 2009 at 06:33:10PM +0200, Andrea Arcangeli wrote:
> Hello,
>
> the debug code in my ide_dma_cancel patch (not yet included upstream)
> made us notice that when qemu_aio_flush returns, there are still
> pending aio commands that waits to complete. Auditing the code I found
> strange stuff like the fact qemu_aio_waits does nothing if there's an
> unrelated (no aio related) bh executed. And I think I found the reason
> of why there was still pending aio when qemu_aio_flush because
> qemu_aio_wait does a lot more than wait, it can start aio, and if the
> previous ->io_flush returned zero, the loop ends and ->io_flush isn't
> repeated. The fact an unrelated bh can make qemu_aio_wait a noop seems
> troublesome for all callers that aren't calling qemu_aio_wait in a
> loop like qemu_aio_flush, so I preferred to change those callers to a
> safer qemu_aio_flush in case the bh executed generates more pending
> I/O. What you think about this patch against qemu git?
Looks good to me. In my unsubmitted aio support patches for qemu-io
I had to call qemu_aio_wait at least twice to get aio requests reliably
completed, but with this patch and calling qemu_aio_flush it always
completes all requests.
next prev parent reply other threads:[~2009-05-30 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 16:33 [Qemu-devel] fix bdrv_read/write_em and qemu_aio_flush Andrea Arcangeli
2009-05-30 10:08 ` Christoph Hellwig [this message]
2009-05-30 12:17 ` Andrea Arcangeli
2009-06-04 11:26 ` [Qemu-devel] [PATCH] fix qemu_aio_flush Andrea Arcangeli
2009-06-04 11:51 ` [Qemu-devel] " Kevin Wolf
2009-06-05 15:57 ` [Qemu-devel] " Christoph Hellwig
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=20090530100842.GA28053@lst.de \
--to=hch@lst.de \
--cc=aarcange@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).