qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Stefan Hajnoczi' <stefanha@gmail.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>,
	Anthony Perard <anthony.perard@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel
Date: Tue, 16 Apr 2019 09:36:29 +0000	[thread overview]
Message-ID: <3ce7ee587d3d443b9d1b407a3c9e37a7@AMSPEX02CL01.citrite.net> (raw)
In-Reply-To: <20190415084249.GA29134@stefanha-x1.localdomain>

> -----Original Message-----
[snip]
> > > 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?
> 
> Hi,
> Handlers are invoked by the aio_poll() event loop.  Some handlers are
> considered "external" in the sense that they submit new I/O requests
> from the guest or outside world.  Others are considered "internal" in
> the sense that they are part of the block layer and not an entry point
> into the block layer.
> 
> There are points where the block layer wants to run the event loop but
> new requests must not be submitted.  In this case aio_disable_external()
> will be called so that "external" handlers are not processed.
> 
> For example, see virtio's virtio_queue_aio_set_host_notifier_handler().
> This is the virtqueue kick ioeventfd and it shouldn't be processed when
> aio_disable_external() has been called.
> 

Thanks for the explanation Stefan. Xen event channels/shared rings should indeed be considered as external sources.

  Cheers,

    Paul

  parent reply	other threads:[~2019-04-16  9:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 15:16 [Qemu-devel] [PATCH 0/3] Support IOThread polling for PV shared rings Paul Durrant
2019-04-08 15:16 ` Paul Durrant
2019-04-08 15:16 ` [Qemu-devel] [PATCH 1/3] xen-bus: use a separate fd for each event channel Paul Durrant
2019-04-08 15:16   ` Paul Durrant
2019-04-10 11:37   ` Anthony PERARD
2019-04-10 11:37     ` Anthony PERARD
2019-04-08 15:16 ` [Qemu-devel] [PATCH 2/3] xen-bus: allow AioContext to be specified " Paul Durrant
2019-04-08 15:16   ` Paul Durrant
2019-04-10 12:57   ` Anthony PERARD
2019-04-10 12:57     ` Anthony PERARD
2019-04-10 15:20     ` Paul Durrant
2019-04-10 15:20       ` Paul Durrant
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           ` Paul Durrant
2019-04-15  8:42       ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2019-04-15  8:42         ` Stefan Hajnoczi
2019-04-16  9:36         ` Paul Durrant [this message]
2019-04-16  9:36           ` Paul Durrant
2019-04-08 15:16 ` [Qemu-devel] [PATCH 3/3] xen-bus / xen-block: add support for event channel polling Paul Durrant
2019-04-08 15:16   ` Paul Durrant
2019-04-10 15:09   ` Anthony PERARD
2019-04-10 15:09     ` Anthony PERARD

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=3ce7ee587d3d443b9d1b407a3c9e37a7@AMSPEX02CL01.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=anthony.perard@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@gmail.com \
    --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 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).