From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Mike Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [RFC PATCH 1/3] aio-context: if io_flush isn't provided, assume "always busy"
Date: Tue, 2 Apr 2013 10:34:03 +0200 [thread overview]
Message-ID: <20130402083332.GE2341@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <5154D42E.70804@redhat.com>
Am 29.03.2013 um 00:37 hat Paolo Bonzini geschrieben:
> Il 28/03/2013 22:52, Anthony Liguori ha scritto:
> > Today, all callers of qemu_aio_set_fd_handler() pass a valid io_flush
> > function.
>
> Except one:
>
> aio_set_event_notifier(ctx, &ctx->notifier,
> (EventNotifierHandler *)
> event_notifier_test_and_clear, NULL);
>
> This is the EventNotifier that is used by qemu_notify_event.
>
> It's quite surprising that this patch works and passes the tests. /me
> reads cover letter... ah, it is untested. :)
>
> But if you can eliminate the sole usage of aio_wait()'s return value (in
> bdrv_drain_all()), everything would be much simpler. There is a
> relatively convenient
>
> assert(QLIST_EMPTY(&bs->tracked_requests));
>
> that you can use as the exit condition instead. Perhaps it's not
> trivial to do it efficiently, but it's not a fast path.
We just need to move to .bdrv_drain() for all block driver that
register an AioHandler. I'm pretty sure that each one has its own
data structures to manage in-flight requests (basically what is the
aio_flush handler today would become the .bdrv_drain callback).
Then bdrv_drain_all() can directly use the bdrv_drain() return value and
doesn't need to have it passed through aio_wait() any more.
Kevin
next prev parent reply other threads:[~2013-04-02 8:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 21:52 [Qemu-devel] [RFC PATCH 0/3] aio-context start to eliminate io_flush Anthony Liguori
2013-03-28 21:52 ` [Qemu-devel] [RFC PATCH 1/3] aio-context: if io_flush isn't provided, assume "always busy" Anthony Liguori
2013-03-28 23:37 ` Paolo Bonzini
2013-04-02 8:34 ` Kevin Wolf [this message]
2013-04-08 15:28 ` Stefan Hajnoczi
2013-03-28 21:52 ` [Qemu-devel] [RFC PATCH 2/3] sheepdog: pass NULL for io_flush Anthony Liguori
2013-03-28 23:38 ` Paolo Bonzini
2013-04-02 8:37 ` Kevin Wolf
2013-04-02 10:15 ` Paolo Bonzini
2013-04-08 15:31 ` Stefan Hajnoczi
2013-04-08 15:38 ` Kevin Wolf
2013-03-28 21:52 ` [Qemu-devel] [RFC PATCH 3/3] rbd: remove aio handler when no requests are pending Anthony Liguori
2013-03-28 23:39 ` Paolo Bonzini
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=20130402083332.GE2341@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@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).