Re: [Qemu-devel] [PATCH v4 3/3] aio: Introduce aio-epoll.c

2015-11-01 Thread Fam Zheng
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

Re: [Qemu-devel] [PATCH v4 3/3] aio: Introduce aio-epoll.c

2015-10-30 Thread Stefan Hajnoczi
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()/a

[Qemu-devel] [PATCH v4 3/3] aio: Introduce aio-epoll.c

2015-10-29 Thread Fam Zheng
To minimize code duplication, epoll is hooked into aio-posix's aio_poll() instead of rolling its own. This approach also has both compile-time and run-time switchability. 1) When QEMU starts with a small number of fds in the event loop, ppoll is used. 2) When QEMU starts with a big number of fds,