Dear all, I'm submitting this patch series for review under the RFC tag.
This patch series refines the aio_poll adaptive polling logic to reduce unnecessary busy-waiting and improve CPU efficiency. The first patch prevents redundant polling time calculation when polling is disabled. The second patch enhances the adaptive polling mechanism by dynamically adjusting the iothread's polling duration based on event intervals measured by individual AioHandlers. The third patch introduces a new 'poll-weight' parameter to adjust how much the current interval influences the next polling duration. We evaluated the patches on an s390x host with a single guest using 16 virtio block devices backed by FCP multipath devices in a separate-disk setup, with the I/O scheduler set to 'none' in both host and guest. The fio workload included sequential and random read/write with varying numbers of jobs (1,4,8,16) and io_depth of 8. The tests were conducted with single and dual iothreads, using the newly introduced poll-weight parameter to measure their impact on CPU cost and throughput. Compared to the baseline, across four FIO workload patterns (sequential R/W, random R/W), and averaged over FIO job counts of 1, 4, 8, and 16, throughput decreased slightly (-3% to -8% for one iothread, -2% to -5% for two iothreads), while CPU usage on the s390x host dropped significantly (-10% to -25% and -7% to -12%, respectively). Best regards, Jaehoon Kim Jaehoon Kim (3): aio-poll: avoid unnecessary polling time computation aio-poll: refine iothread polling using weighted handler intervals qapi/iothread: introduce poll-weight parameter for aio-poll include/qemu/aio.h | 8 +- include/system/iothread.h | 1 + iothread.c | 10 ++ monitor/hmp-cmds.c | 1 + qapi/misc.json | 6 ++ qapi/qom.json | 8 +- qemu-options.hx | 7 +- tests/unit/test-nested-aio-poll.c | 2 +- util/aio-posix.c | 151 +++++++++++++++++++++--------- util/aio-win32.c | 3 +- util/async.c | 2 + 11 files changed, 147 insertions(+), 52 deletions(-) -- 2.50.1
