[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 0/7] aio: Support epoll by introducing qemu_poll
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v4 0/7] aio: Support epoll by introducing qemu_poll abstraction |
Date: |
Wed, 29 Apr 2015 11:24:24 +0800 |
v4: Rebase to 2.3 and rerun tests. timerfd+epoll shows clear improvement over
current master when the virtio-console device attaches more fds to the main
loop:
syscall high # of fd low # of fd
-------------------------------------------------
qemu.git(ppoll) 24 83
ppoll+epoll 49 82
timerfd+epoll 49 91
glib 20 82
(In high # of fd case, 3 activated but idle virtio-console devices are
attached, which will add us hundereds of fds to poll)
Although a new epoll_pwait1 syscall is still being worked on [1], the QEMU
part to make use of that (if any) will base on this, so let's merge it
first.
[1]: http://www.spinics.net/lists/linux-api/msg08216.html
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 (7):
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-glib: Support ppoll
poll-linux: Add timerfd support
Makefile.objs | 2 +
aio-posix.c | 26 +++-
async.c | 3 +
include/block/aio.h | 6 +
include/qemu/poll.h | 40 +++++++
include/qemu/timer.h | 13 --
include/qemu/typedefs.h | 4 +-
main-loop.c | 35 +++++-
poll-glib.c | 153 ++++++++++++++++++++++++
poll-linux.c | 310 ++++++++++++++++++++++++++++++++++++++++++++++++
qemu-timer.c | 28 -----
tests/Makefile | 2 +
tests/test-poll.c | 272 ++++++++++++++++++++++++++++++++++++++++++
13 files changed, 841 insertions(+), 53 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
- [Qemu-devel] [PATCH v4 0/7] aio: Support epoll by introducing qemu_poll abstraction,
Fam Zheng <=
- [Qemu-devel] [PATCH v4 1/7] poll: Introduce QEMU Poll API, Fam Zheng, 2015/04/28
- [Qemu-devel] [PATCH v4 2/7] posix-aio: Use QEMU poll interface, Fam Zheng, 2015/04/28
- [Qemu-devel] [PATCH v4 3/7] poll: Add epoll implementation for qemu_poll, Fam Zheng, 2015/04/28
- [Qemu-devel] [PATCH v4 4/7] main-loop: Replace qemu_poll_ns with qemu_poll, Fam Zheng, 2015/04/28
- [Qemu-devel] [PATCH v4 7/7] poll-linux: Add timerfd support, Fam Zheng, 2015/04/28
- [Qemu-devel] [PATCH v4 5/7] tests: Add test case for qemu_poll, Fam Zheng, 2015/04/28
- [Qemu-devel] [PATCH v4 6/7] poll-glib: Support ppoll, Fam Zheng, 2015/04/28
- Re: [Qemu-devel] [PATCH v4 0/7] aio: Support epoll by introducing qemu_poll abstraction, Stefan Hajnoczi, 2015/04/29
- Re: [Qemu-devel] [PATCH v4 0/7] aio: Support epoll by introducing qemu_poll abstraction, Kevin Wolf, 2015/04/30