qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	pbonzini@redhat.com, qemu-block@nongnu.org,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v4 3/3] aio: Introduce aio-epoll.c
Date: Mon, 2 Nov 2015 21:33:19 +0800	[thread overview]
Message-ID: <20151102133319.GA10611@ad.usersys.redhat.com> (raw)
In-Reply-To: <20151102131916.GD10139@stefanha-x1.localdomain>

On Mon, 11/02 13:19, Stefan Hajnoczi wrote:
> On Mon, Nov 02, 2015 at 10:32:54AM +0800, Fam Zheng wrote:
> > On Fri, 10/30 10:07, Stefan Hajnoczi wrote:
> > > On Fri, Oct 30, 2015 at 12:06:29PM +0800, Fam Zheng wrote:
> > > > To comply with aio_{disable,enable}_external, we always use ppoll when
> > > > aio_external_disabled() is true.
> > > 
> > > All file descriptors are added to the epoll fd.  Does that mean epoll
> > > will report the same fds again after we come out of
> > > ppoll()/aio_external_disabled()?
> > > 
> > > The two constraints to think about:
> > > 1. Ideally there should be no duplicated events.
> > > 2. There absolutely cannot be any missed events.
> > > 
> > 
> > I'm not sure I understood your question. The file descriptors added to epollfd
> > are always in sync with ppoll, so there is no difference between calling
> > epoll_wait and ppoll. When we come out of aio_external_disabled(), the same set
> > of fds will be polled, but the events got by ppoll should already be handled.
> > 
> > What am I missing?
> 
> I'm asking about duplicated events.  The epoll fd monitors the same set
> of fds as ppoll().  When we come out of aio_external_disabled() will
> epoll fd see the old events that have already been handled by ppoll()?

No, we don't get duplicated events. epoll fd will only see unhandled (new)
events.

Fam

  reply	other threads:[~2015-11-02 13:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30  4:06 [Qemu-devel] [PATCH v4 0/3] aio: Use epoll in aio_poll() Fam Zheng
2015-10-30  4:06 ` [Qemu-devel] [PATCH v4 1/3] aio: Introduce aio_external_disabled Fam Zheng
2015-10-30  4:06 ` [Qemu-devel] [PATCH v4 2/3] aio: Introduce aio_context_setup Fam Zheng
2015-10-30  4:06 ` [Qemu-devel] [PATCH v4 3/3] aio: Introduce aio-epoll.c Fam Zheng
2015-10-30 10:07   ` Stefan Hajnoczi
2015-11-02  2:32     ` Fam Zheng
2015-11-02 13:19       ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-11-02 13:33         ` Fam Zheng [this message]
2015-11-03 11:23           ` Stefan Hajnoczi
2015-11-03 13:17 ` [Qemu-devel] [PATCH v4 0/3] aio: Use epoll in aio_poll() 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=20151102133319.GA10611@ad.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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).