[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 2/2] aio: Introduce aio-epoll.c
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH v2 2/2] aio: Introduce aio-epoll.c |
Date: |
Fri, 16 Oct 2015 18:10:47 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.