From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn1NQ-0000Fh-5g for qemu-devel@nongnu.org; Fri, 16 Oct 2015 05:32:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn1NL-00021x-5H for qemu-devel@nongnu.org; Fri, 16 Oct 2015 05:32:40 -0400 Date: Fri, 16 Oct 2015 11:32:31 +0200 From: Stefan Hajnoczi Message-ID: <20151016093231.GH7432@stefanha-thinkpad.redhat.com> References: <1444734655-3630-1-git-send-email-famz@redhat.com> <1444734655-3630-3-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444734655-3630-3-git-send-email-famz@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: Fam Zheng Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org 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? > +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? I just want to make sure I understand how this constant affects epoll behavior.