qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC 0/4] aio: Use epoll_wait in aio_poll
@ 2015-06-30 13:19 Fam Zheng
  2015-06-30 13:19 ` [Qemu-devel] [PATCH RFC 1/4] aio: Introduce aio_set_fd_handler_pri Fam Zheng
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Fam Zheng @ 2015-06-30 13:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, pbonzini, qemu-block, Stefan Hajnoczi

epoll is more scalable than ppoll. It performs faster than ppoll when the
number of polled fds is high.

See patch 4 for an example of the senario and some benchmark data.

Note: it is only effective on iothread (dataplane), while the main loop cannot
benefit from this yet, because the iohandler and chardev GSource's don't easily
fit into this epoll interface style (that's why main loop uses qemu_poll_ns
directly instead of aio_poll()).

There is hardly any timer activity in iothreads for now, as a result the
timeout is always 0 or -1. Therefore, timerfd, or the said nanosecond
epoll_pwait1 interface, which fixes the timeout granularity deficiency is not
immediately necessary at this point, but still that will be simple to add.

Please review!

Fam

Fam Zheng (4):
  aio: Introduce aio_set_fd_handler_pri
  aio: Move aio_set_fd_handler to async.c
  aio: Introduce aio_context_setup
  aio-posix: Use epoll in aio_poll

 aio-posix.c         | 127 +++++++++++++++++++++++++++++++++++++++++++++++-----
 aio-win32.c         |   7 +--
 async.c             |  24 ++++++++--
 include/block/aio.h |   6 +++
 4 files changed, 144 insertions(+), 20 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-07-13 10:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-30 13:19 [Qemu-devel] [PATCH RFC 0/4] aio: Use epoll_wait in aio_poll Fam Zheng
2015-06-30 13:19 ` [Qemu-devel] [PATCH RFC 1/4] aio: Introduce aio_set_fd_handler_pri Fam Zheng
2015-07-07 14:29   ` Stefan Hajnoczi
2015-07-08  1:07     ` Fam Zheng
2015-06-30 13:19 ` [Qemu-devel] [PATCH RFC 2/4] aio: Move aio_set_fd_handler to async.c Fam Zheng
2015-07-07 14:30   ` Stefan Hajnoczi
2015-06-30 13:19 ` [Qemu-devel] [PATCH RFC 3/4] aio: Introduce aio_context_setup Fam Zheng
2015-07-07 14:35   ` Stefan Hajnoczi
2015-07-08  1:15     ` Fam Zheng
2015-07-08 10:51       ` Stefan Hajnoczi
2015-06-30 13:19 ` [Qemu-devel] [PATCH RFC 4/4] aio-posix: Use epoll in aio_poll Fam Zheng
2015-07-07 15:08   ` Stefan Hajnoczi
2015-07-07 15:27     ` Paolo Bonzini
2015-07-08  1:01     ` Fam Zheng
2015-07-08 10:58       ` Stefan Hajnoczi
2015-07-10  0:46         ` Fam Zheng
2015-07-13 10:02           ` Stefan Hajnoczi
2015-07-07 14:54 ` [Qemu-devel] [PATCH RFC 0/4] aio: Use epoll_wait " Christian Borntraeger
2015-07-08  1:02   ` Fam Zheng
2015-07-08  7:59     ` Christian Borntraeger

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).