qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/6] aio: Support epoll by introducing qemu_poll abstraction
@ 2014-12-04  3:43 Fam Zheng
  2014-12-04  3:43 ` [Qemu-devel] [PATCH v2 1/6] poll: Introduce QEMU Poll API Fam Zheng
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Fam Zheng @ 2014-12-04  3:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Paolo Bonzini, Stefan Hajnoczi

v2: Emulate nanoseconds precison of timeout with ppoll and timerfd.
    Their performance is on par with each other, but both much better than
    qemu.git:

    syscall         high # of fd      low # of fd
    -------------------------------------------------
    qemu.git(ppoll) 44                96
    ppoll+epoll     85                101
    timerfd+epoll   87                109

(In high # of fd case, 3 activated but idle virtio-console devices are
attached, which will add us hundereds of fds to poll)

v1 cover letter
---------------

ppoll(2) doesn't scale as well as epoll: The elapsed time of the syscall is
linear to the number of fd's we poll, which hurts performance a bit when the
number of devices are many, or when a virtio device registers many virtqueues
(virtio-serial, for instance).

This series introduces qemu_poll, which is implemented  with g_poll and epoll,
decided at configure time with CONFIG_EPOLL.

Fam


Fam Zheng (6):
  poll: Introduce QEMU Poll API
  posix-aio: Use QEMU poll interface
  poll: Add epoll implementation for qemu_poll
  main-loop: Replace qemu_poll_ns with qemu_poll
  tests: Add test case for qemu_poll
  poll-linux: Add timerfd support

 Makefile.objs           |   2 +
 aio-posix.c             |  52 ++++----
 async.c                 |   5 +-
 include/block/aio.h     |   7 +-
 include/qemu/poll.h     |  40 ++++++
 include/qemu/timer.h    |  13 --
 include/qemu/typedefs.h |   2 +
 main-loop.c             |  35 +++++-
 poll-glib.c             | 130 ++++++++++++++++++++
 poll-linux.c            | 314 ++++++++++++++++++++++++++++++++++++++++++++++++
 qemu-timer.c            |  28 -----
 tests/Makefile          |   2 +
 tests/test-poll.c       | 272 +++++++++++++++++++++++++++++++++++++++++
 13 files changed, 821 insertions(+), 81 deletions(-)
 create mode 100644 include/qemu/poll.h
 create mode 100644 poll-glib.c
 create mode 100644 poll-linux.c
 create mode 100644 tests/test-poll.c

-- 
1.9.3

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

end of thread, other threads:[~2015-01-08 13:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04  3:43 [Qemu-devel] [PATCH v2 0/6] aio: Support epoll by introducing qemu_poll abstraction Fam Zheng
2014-12-04  3:43 ` [Qemu-devel] [PATCH v2 1/6] poll: Introduce QEMU Poll API Fam Zheng
2014-12-04  3:43 ` [Qemu-devel] [PATCH v2 2/6] posix-aio: Use QEMU poll interface Fam Zheng
2014-12-04  3:43 ` [Qemu-devel] [PATCH v2 3/6] poll: Add epoll implementation for qemu_poll Fam Zheng
2014-12-04  3:43 ` [Qemu-devel] [PATCH v2 4/6] main-loop: Replace qemu_poll_ns with qemu_poll Fam Zheng
2014-12-04  3:43 ` [Qemu-devel] [PATCH v2 5/6] tests: Add test case for qemu_poll Fam Zheng
2014-12-04  3:43 ` [Qemu-devel] [PATCH v2 6/6] poll-linux: Add timerfd support Fam Zheng
2014-12-16  2:04 ` [Qemu-devel] [PATCH v2 0/6] aio: Support epoll by introducing qemu_poll abstraction Fam Zheng
2015-01-07 15:08   ` Stefan Hajnoczi
2015-01-08  2:53     ` Fam Zheng
2015-01-08 13:00       ` Paolo Bonzini

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