From: Jaehoon Kim <jhkim@linux.ibm.com>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: mjrosato@linux.ibm.com, farman@linux.ibm.com,
pbonzini@redhat.com, stefanha@redhat.com, fam@euphon.net,
armbru@redhat.com, eblake@redhat.com, berrange@redhat.com,
eduardo@habkost.net, dave@treblig.org, sw@weilnetz.de,
Jaehoon Kim <jhkim@linux.ibm.com>
Subject: [PATCH RFC v2 0/3] improve aio-polling efficiency
Date: Mon, 23 Mar 2026 08:54:48 -0500 [thread overview]
Message-ID: <20260323135451.579655-1-jhkim@linux.ibm.com> (raw)
Dear all,
This is v2 of the RFC patch series to refine aio_poll adaptive
polling logic for better CPU efficiency.
v1:
https://lore.kernel.org/qemu-devel/20260113174824.464720-1-jhkim@linux.ibm.com/
Changes in v2:
- Patch 2/3: Changed default POLL_WEIGHT_SHIFT from 2 to 3
based on extensive testing. Updated commit message with
detailed performance comparison showing weight=3 provides
better balance between throughput and CPU savings
- Patch 3/3: Added proper initialization of poll-weight,
poll-grow, and poll-shrink defaults in iothread.c
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 for runtime
control over how much the current interval influences the next
polling duration.
We evaluated the patches on s390x hosts with different configurations:
Initial testing (Fedora 42):
Using a single guest with 16 virtio block devices backed by FCP
multipath devices, I/O scheduler set to 'none'. Across four FIO
workload patterns (sequential R/W, random R/W), averaged over
numjobs 1, 4, 8, and 16:
- Throughput: -3% to -8% (one iothread), -2% to -5% (two iothreads)
- CPU usage: -10% to -25% (one iothread), -7% to -12% (two iothreads)
Additional validation (RHEL 10.1 GA + QEMU 10.0.0):
Comparing baseline vs poll-weight=2/3 with FCP and FICON storage,
using 1 and 8 iothreads, averaged over numjobs 1, 4, and 8:
Summary of results (% change vs baseline):
- Throughput avg: -2.2% (weight=3), -2.4% (weight=2)
- CPU consumption avg: -9.4% (weight=3), -10.9% (weight=2)
Weight=3 was selected as default for providing slightly better
throughput (-2.2% vs -2.4%) while maintaining substantial CPU
savings (-9.4%).
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 | 34 ++++++-
monitor/hmp-cmds.c | 1 +
qapi/misc.json | 7 ++
qapi/qom.json | 8 +-
qemu-options.hx | 7 +-
tests/unit/test-nested-aio-poll.c | 2 +-
util/aio-posix.c | 141 ++++++++++++++++++++----------
util/aio-win32.c | 3 +-
util/async.c | 2 +
11 files changed, 161 insertions(+), 53 deletions(-)
--
2.50.1
next reply other threads:[~2026-03-23 13:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 13:54 Jaehoon Kim [this message]
2026-03-23 13:54 ` [PATCH RFC v2 1/3] aio-poll: avoid unnecessary polling time computation Jaehoon Kim
2026-03-25 17:22 ` Stefan Hajnoczi
2026-03-26 18:17 ` JAEHOON KIM
2026-03-26 18:34 ` Stefan Hajnoczi
2026-03-23 13:54 ` [PATCH RFC v2 2/3] aio-poll: refine iothread polling using weighted handler intervals Jaehoon Kim
2026-03-25 20:37 ` Stefan Hajnoczi
2026-03-23 13:54 ` [PATCH RFC v2 3/3] qapi/iothread: introduce poll-weight parameter for aio-poll Jaehoon Kim
2026-03-25 14:04 ` Markus Armbruster
2026-03-26 15:55 ` JAEHOON KIM
2026-03-25 16:52 ` Stefan Hajnoczi
2026-03-25 16:56 ` Stefan Hajnoczi
2026-03-26 16:13 ` JAEHOON KIM
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260323135451.579655-1-jhkim@linux.ibm.com \
--to=jhkim@linux.ibm.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=fam@euphon.net \
--cc=farman@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox