From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Benoît Canet" <benoit.canet@irqsave.net>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] throttle: add throttle_detach/attach_aio_context()
Date: Thu, 15 May 2014 09:57:37 +0200 [thread overview]
Message-ID: <20140515075737.GC1111@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20140514150558.GA5955@irqsave.net>
On Wed, May 14, 2014 at 05:05:58PM +0200, Benoît Canet wrote:
> The Wednesday 14 May 2014 à 16:22:45 (+0200), Stefan Hajnoczi wrote :
> > Block I/O throttling uses timers and currently always adds them to the
> > main loop. Throttling will break if bdrv_set_aio_context() is used to
> > move a BlockDriverState to a different AioContext.
> >
> > This patch adds throttle_detach/attach_aio_context() interfaces so the
> s/so the/to the/ ?
Thanks, let me know how you feel about my replies below. If there is no
other need to respin then let's let this commit description typo slide.
> > diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
> > index ab29b0b..b890613 100644
> > --- a/include/qemu/throttle.h
> > +++ b/include/qemu/throttle.h
> > @@ -67,6 +67,11 @@ typedef struct ThrottleState {
>
> Can we make sure this header knows about AioContext in case
> there is another throttle user not block related ?
It already does because qemu-common.h includes qemu-typedefs.h. We get
an opaque AioContext.
The point of the typedefs.h is to avoid pulling in all the headers when
callers just pass around pointers and don't need the actual definition.
In this case, I think the split makes sense because callers might pass
AioContext without actually using the AioContext API themselves.
> > diff --git a/tests/test-throttle.c b/tests/test-throttle.c
> > index 1d4ffd3..5fa5000 100644
> > --- a/tests/test-throttle.c
> > +++ b/tests/test-throttle.c
> > @@ -12,8 +12,10 @@
> >
> > #include <glib.h>
> > #include <math.h>
>
> > +#include "block/aio.h"
>
> And remove this one eventually.
This include pulls in the AioContext API because the test case itself
manipulates the AioContext.
next prev parent reply other threads:[~2014-05-15 7:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 14:22 [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support Stefan Hajnoczi
2014-05-14 14:22 ` [Qemu-devel] [PATCH 1/3] throttle: add throttle_detach/attach_aio_context() Stefan Hajnoczi
2014-05-14 15:05 ` Benoît Canet
2014-05-15 7:57 ` Stefan Hajnoczi [this message]
2014-05-15 11:25 ` Benoît Canet
2014-05-14 14:22 ` [Qemu-devel] [PATCH 2/3] throttle: add detach/attach test case Stefan Hajnoczi
2014-05-14 15:08 ` Benoît Canet
2014-05-14 14:22 ` [Qemu-devel] [PATCH 3/3] blockdev: acquire AioContext in block_set_io_throttle Stefan Hajnoczi
2014-05-14 15:11 ` Benoît Canet
2014-05-14 15:14 ` [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support Benoît Canet
2014-05-14 17:40 ` Benoît Canet
2014-05-15 7:46 ` Stefan Hajnoczi
2014-06-03 13:44 ` Stefan Hajnoczi
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=20140515075737.GC1111@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=kwolf@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).