From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn1yV-0005nu-M5 for qemu-devel@nongnu.org; Fri, 16 Oct 2015 06:11:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn1yV-0001lj-0J for qemu-devel@nongnu.org; Fri, 16 Oct 2015 06:10:59 -0400 Date: Fri, 16 Oct 2015 18:10:47 +0800 From: Fam Zheng Message-ID: <20151016101047.GA16813@ad.usersys.redhat.com> References: <1444734655-3630-1-git-send-email-famz@redhat.com> <1444734655-3630-3-git-send-email-famz@redhat.com> <20151016093231.GH7432@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151016093231.GH7432@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 2/2] aio: Introduce aio-epoll.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org On Fri, 10/16 11:32, Stefan Hajnoczi wrote: > On Tue, Oct 13, 2015 at 07:10:55PM +0800, Fam Zheng wrote: > > +static bool aio_epoll_try_enable(AioContext *ctx) > > +{ > > + AioHandler *node; > > + struct epoll_event event; > > + if (!ctx->epoll_available) { > > + return false; > > + } > > Why check this here since aio_epoll_check_poll() already checks it? You're right, it's redundant. I will remove it. > > > +static int aio_epoll(AioContext *ctx, GPollFD *pfds, > > + unsigned npfd, int64_t timeout) > > +{ > > + AioHandler *node; > > + int i, ret = 0; > > + struct epoll_event events[128]; > > The strategy is to support up to 128 events per epoll_wait(2) call and > then wait for the next event loop iteration to harvest any remaining > events? Yes.