From: Anthony PERARD <anthony.perard@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefano Stabellini <sstabellini@kernel.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel
Date: Wed, 10 Apr 2019 16:22:58 +0100 [thread overview]
Message-ID: <20190410152258.GG1435@perard.uk.xensource.com> (raw)
In-Reply-To: <582f92f1ddf24985b75c32fe913784df@AMSPEX02CL01.citrite.net>
On Wed, Apr 10, 2019 at 04:20:05PM +0100, Paul Durrant wrote:
> > -----Original Message-----
> > From: Anthony PERARD [mailto:anthony.perard@citrix.com]
> > Sent: 10 April 2019 13:57
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: qemu-devel@nongnu.org; qemu-block@nongnu.org; xen-devel@lists.xenproject.org; Stefano Stabellini
> > <sstabellini@kernel.org>; Stefan Hajnoczi <stefanha@redhat.com>; Kevin Wolf <kwolf@redhat.com>; Max
> > Reitz <mreitz@redhat.com>
> > Subject: Re: [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel
> >
> > On Mon, Apr 08, 2019 at 04:16:16PM +0100, Paul Durrant wrote:
> > > This patch adds an AioContext parameter to xen_device_bind_event_channel()
> > > and then uses aio_set_fd_handler() to set the callback rather than
> > > qemu_set_fd_handler().
> > >
> > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > > ---
> > > @@ -943,6 +944,7 @@ static void xen_device_event(void *opaque)
> > > }
> > >
> > > XenEventChannel *xen_device_bind_event_channel(XenDevice *xendev,
> > > + AioContext *ctx,
> > > unsigned int port,
> > > XenEventHandler handler,
> > > void *opaque, Error **errp)
> > > @@ -968,8 +970,9 @@ XenEventChannel *xen_device_bind_event_channel(XenDevice *xendev,
> > > channel->handler = handler;
> > > channel->opaque = opaque;
> > >
> > > - qemu_set_fd_handler(xenevtchn_fd(channel->xeh), xen_device_event, NULL,
> > > - channel);
> > > + channel->ctx = ctx;
> > > + aio_set_fd_handler(channel->ctx, xenevtchn_fd(channel->xeh), false,
> > > + xen_device_event, NULL, NULL, channel);
> >
> > I wonder if the `'is_external' parameter of aio_set_fd_handler shoud be
> > `true' here, instead. That flag seems to be used when making a snapshot
> > of a blockdev, for example.
> >
> > That was introduced by:
> > dca21ef23ba48f6f1428c59f295a857e5dc203c8^..c07bc2c1658fffeee08eb46402b2f66d55b07586
> >
> > What do you think?
>
> Interesting. I admit I was merely transcribing what qemu_set_fd_handler() passes without really looking into the values. Looking at the arguments that virtio-blk passes to aio_set_event_notifier() though, and what 'is_external' means, it would appear that setting it to true is probably the right thing to do. Do you want me to send a v2 of the series or can you fix it up?
I'll fix that up.
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: Anthony PERARD <anthony.perard@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel
Date: Wed, 10 Apr 2019 16:22:58 +0100 [thread overview]
Message-ID: <20190410152258.GG1435@perard.uk.xensource.com> (raw)
In-Reply-To: <582f92f1ddf24985b75c32fe913784df@AMSPEX02CL01.citrite.net>
On Wed, Apr 10, 2019 at 04:20:05PM +0100, Paul Durrant wrote:
> > -----Original Message-----
> > From: Anthony PERARD [mailto:anthony.perard@citrix.com]
> > Sent: 10 April 2019 13:57
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: qemu-devel@nongnu.org; qemu-block@nongnu.org; xen-devel@lists.xenproject.org; Stefano Stabellini
> > <sstabellini@kernel.org>; Stefan Hajnoczi <stefanha@redhat.com>; Kevin Wolf <kwolf@redhat.com>; Max
> > Reitz <mreitz@redhat.com>
> > Subject: Re: [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel
> >
> > On Mon, Apr 08, 2019 at 04:16:16PM +0100, Paul Durrant wrote:
> > > This patch adds an AioContext parameter to xen_device_bind_event_channel()
> > > and then uses aio_set_fd_handler() to set the callback rather than
> > > qemu_set_fd_handler().
> > >
> > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > > ---
> > > @@ -943,6 +944,7 @@ static void xen_device_event(void *opaque)
> > > }
> > >
> > > XenEventChannel *xen_device_bind_event_channel(XenDevice *xendev,
> > > + AioContext *ctx,
> > > unsigned int port,
> > > XenEventHandler handler,
> > > void *opaque, Error **errp)
> > > @@ -968,8 +970,9 @@ XenEventChannel *xen_device_bind_event_channel(XenDevice *xendev,
> > > channel->handler = handler;
> > > channel->opaque = opaque;
> > >
> > > - qemu_set_fd_handler(xenevtchn_fd(channel->xeh), xen_device_event, NULL,
> > > - channel);
> > > + channel->ctx = ctx;
> > > + aio_set_fd_handler(channel->ctx, xenevtchn_fd(channel->xeh), false,
> > > + xen_device_event, NULL, NULL, channel);
> >
> > I wonder if the `'is_external' parameter of aio_set_fd_handler shoud be
> > `true' here, instead. That flag seems to be used when making a snapshot
> > of a blockdev, for example.
> >
> > That was introduced by:
> > dca21ef23ba48f6f1428c59f295a857e5dc203c8^..c07bc2c1658fffeee08eb46402b2f66d55b07586
> >
> > What do you think?
>
> Interesting. I admit I was merely transcribing what qemu_set_fd_handler() passes without really looking into the values. Looking at the arguments that virtio-blk passes to aio_set_event_notifier() though, and what 'is_external' means, it would appear that setting it to true is probably the right thing to do. Do you want me to send a v2 of the series or can you fix it up?
I'll fix that up.
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
WARNING: multiple messages have this Message-ID (diff)
From: Anthony PERARD <anthony.perard@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefano Stabellini <sstabellini@kernel.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Qemu-devel] [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel
Date: Wed, 10 Apr 2019 16:22:58 +0100 [thread overview]
Message-ID: <20190410152258.GG1435@perard.uk.xensource.com> (raw)
Message-ID: <20190410152258.z2nCH9sDglal5YyszNz8kYvfF81DVTn5Co0j0qIVAcU@z> (raw)
In-Reply-To: <582f92f1ddf24985b75c32fe913784df@AMSPEX02CL01.citrite.net>
On Wed, Apr 10, 2019 at 04:20:05PM +0100, Paul Durrant wrote:
> > -----Original Message-----
> > From: Anthony PERARD [mailto:anthony.perard@citrix.com]
> > Sent: 10 April 2019 13:57
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: qemu-devel@nongnu.org; qemu-block@nongnu.org; xen-devel@lists.xenproject.org; Stefano Stabellini
> > <sstabellini@kernel.org>; Stefan Hajnoczi <stefanha@redhat.com>; Kevin Wolf <kwolf@redhat.com>; Max
> > Reitz <mreitz@redhat.com>
> > Subject: Re: [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel
> >
> > On Mon, Apr 08, 2019 at 04:16:16PM +0100, Paul Durrant wrote:
> > > This patch adds an AioContext parameter to xen_device_bind_event_channel()
> > > and then uses aio_set_fd_handler() to set the callback rather than
> > > qemu_set_fd_handler().
> > >
> > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > > ---
> > > @@ -943,6 +944,7 @@ static void xen_device_event(void *opaque)
> > > }
> > >
> > > XenEventChannel *xen_device_bind_event_channel(XenDevice *xendev,
> > > + AioContext *ctx,
> > > unsigned int port,
> > > XenEventHandler handler,
> > > void *opaque, Error **errp)
> > > @@ -968,8 +970,9 @@ XenEventChannel *xen_device_bind_event_channel(XenDevice *xendev,
> > > channel->handler = handler;
> > > channel->opaque = opaque;
> > >
> > > - qemu_set_fd_handler(xenevtchn_fd(channel->xeh), xen_device_event, NULL,
> > > - channel);
> > > + channel->ctx = ctx;
> > > + aio_set_fd_handler(channel->ctx, xenevtchn_fd(channel->xeh), false,
> > > + xen_device_event, NULL, NULL, channel);
> >
> > I wonder if the `'is_external' parameter of aio_set_fd_handler shoud be
> > `true' here, instead. That flag seems to be used when making a snapshot
> > of a blockdev, for example.
> >
> > That was introduced by:
> > dca21ef23ba48f6f1428c59f295a857e5dc203c8^..c07bc2c1658fffeee08eb46402b2f66d55b07586
> >
> > What do you think?
>
> Interesting. I admit I was merely transcribing what qemu_set_fd_handler() passes without really looking into the values. Looking at the arguments that virtio-blk passes to aio_set_event_notifier() though, and what 'is_external' means, it would appear that setting it to true is probably the right thing to do. Do you want me to send a v2 of the series or can you fix it up?
I'll fix that up.
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2019-04-10 15:24 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 15:16 [Xen-devel] [PATCH 0/3] Support IOThread polling for PV shared rings Paul Durrant
2019-04-08 15:16 ` [Qemu-devel] " Paul Durrant
2019-04-08 15:16 ` Paul Durrant
2019-04-08 15:16 ` [PATCH 1/3] xen-bus: use a separate fd for each event channel Paul Durrant
2019-04-08 15:16 ` [Qemu-devel] " Paul Durrant
2019-04-08 15:16 ` Paul Durrant
2019-04-08 15:16 ` [Xen-devel] " Paul Durrant
2019-04-10 11:37 ` Anthony PERARD
2019-04-10 11:37 ` [Qemu-devel] " Anthony PERARD
2019-04-10 11:37 ` Anthony PERARD
2019-04-10 11:37 ` Anthony PERARD
2019-04-08 15:16 ` [PATCH 2/3] xen-bus: allow AioContext to be specified " Paul Durrant
2019-04-08 15:16 ` [Xen-devel] " Paul Durrant
2019-04-08 15:16 ` [Qemu-devel] " Paul Durrant
2019-04-08 15:16 ` Paul Durrant
2019-04-10 12:57 ` [Xen-devel] " Anthony PERARD
2019-04-10 12:57 ` [Qemu-devel] " Anthony PERARD
2019-04-10 12:57 ` Anthony PERARD
2019-04-10 15:20 ` [Xen-devel] " Paul Durrant
2019-04-10 15:20 ` [Qemu-devel] " Paul Durrant
2019-04-10 15:20 ` Paul Durrant
2019-04-10 15:22 ` Anthony PERARD [this message]
2019-04-10 15:22 ` Anthony PERARD
2019-04-10 15:22 ` Anthony PERARD
2019-04-10 15:56 ` Paul Durrant
2019-04-10 15:56 ` [Qemu-devel] " Paul Durrant
2019-04-10 15:56 ` Paul Durrant
2019-04-10 15:56 ` [Xen-devel] " Paul Durrant
2019-04-10 15:22 ` Anthony PERARD
2019-04-15 8:42 ` [Xen-devel] [Qemu-block] " Stefan Hajnoczi
2019-04-15 8:42 ` [Qemu-devel] " Stefan Hajnoczi
2019-04-15 8:42 ` Stefan Hajnoczi
2019-04-16 9:36 ` [Xen-devel] " Paul Durrant
2019-04-16 9:36 ` Paul Durrant
2019-04-16 9:36 ` Paul Durrant
2019-04-15 8:42 ` Stefan Hajnoczi
2019-04-10 15:20 ` Paul Durrant
2019-04-10 12:57 ` Anthony PERARD
2019-04-08 15:16 ` [Xen-devel] [PATCH 3/3] xen-bus / xen-block: add support for event channel polling Paul Durrant
2019-04-08 15:16 ` [Qemu-devel] " Paul Durrant
2019-04-08 15:16 ` Paul Durrant
2019-04-10 15:09 ` Anthony PERARD
2019-04-10 15:09 ` [Qemu-devel] " Anthony PERARD
2019-04-10 15:09 ` Anthony PERARD
2019-04-10 15:09 ` [Xen-devel] " Anthony PERARD
2019-04-08 15:16 ` Paul Durrant
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=20190410152258.GG1435@perard.uk.xensource.com \
--to=anthony.perard@citrix.com \
--cc=Paul.Durrant@citrix.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=stefanha@redhat.com \
--cc=xen-devel@lists.xenproject.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.