qemu-patch-raspberry4/include/block
Fam Zheng fbe3fc5cb3 aio: Introduce aio-epoll.c
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, or when more devices are
hot plugged, epoll kicks in when the number of fds hits the threshold.

3) Some fds may not support epoll, such as tty based stdio. In this
case, it falls back to ppoll.

A rough benchmark with scsi-disk on virtio-scsi dataplane (epoll gets
enabled from 64 onward). Numbers are in MB/s.

===============================================
             |     master     |     epoll
             |                |
scsi disks # | read    randrw | read    randrw
-------------|----------------|----------------
1            | 86      36     | 92      45
8            | 87      43     | 86      41
64           | 71      32     | 70      38
128          | 48      24     | 58      31
256          | 37      19     | 57      28
===============================================

To comply with aio_{disable,enable}_external, we always use ppoll when
aio_external_disabled() is true.

[Removed #ifdef CONFIG_EPOLL around AioContext epollfd field declaration
since the field is also referenced outside CONFIG_EPOLL code.
--Stefan]

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1446177989-6702-4-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-09 09:59:47 +00:00
..
accounting.h block: Remove wr_highest_sector from BlockAcctStats 2015-10-23 18:18:23 +02:00
aio.h aio: Introduce aio-epoll.c 2015-11-09 09:59:47 +00:00
block.h block: Introduce "drained begin/end" API 2015-10-23 18:18:24 +02:00
block_int.h block: Introduce "drained begin/end" API 2015-10-23 18:18:24 +02:00
blockjob.h blockjob: Store device name at job creation 2015-10-16 15:34:30 +02:00
nbd.h nbd: Set block size to BDRV_SECTOR_SIZE 2015-03-18 12:07:01 +01:00
qapi.h qmp: fill in the image field in BlockDeviceInfo 2015-04-28 15:36:09 +02:00
scsi.h typofixes - v4 2015-09-11 10:45:43 +03:00
snapshot.h qemu-nbd: support internal snapshot export 2013-12-04 15:19:00 +01:00
thread-pool.h block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
throttle-groups.h throttle: Remove throttle_group_lock/unlock() 2015-10-23 18:18:23 +02:00
write-threshold.h block: add event when disk usage exceeds threshold 2015-02-06 17:24:21 +01:00