Skip to content

RFC Introduce "-object iothread-group"

Fam Zheng qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5aio: Wrap poll parameters into AioContextPollParamsinclude/block/aio.h include/sysemu/iothread.h iothread.c +2 more+29 -321 reply
2/5iothread: Don't error on windowsinclude/sysemu/iothread.h iothread.c util/aio-win32.c+15 -71 reply
3/5iothread: Extract iothread_startinclude/sysemu/iothread.h iothread.c+20 -141 reply
4/5Introduce iothread-groupMakefile.objs include/sysemu/iothread.h iothread-group.c+228 -12 replies
5/5virtio-blk: Add iothread-group propertyhw/block/dataplane/virtio-blk.c hw/block/virtio-blk.c include/hw/virtio/virtio-blk.h+19 -70 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchStefan Hajnoczi
1/5R-b
2/5R-b
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group"

Last time we've looked at "-object iothread,spawns=N" but it was a bit abusive. A dedicated "iothread-group" class is cleaner from the interface point of view. This series does that.

It has the same set of poll parameters as the existing "iothread" object, plus a "size" option to specify how many threads to start. Using iothread-group doesn't require the user to explicitly create the contained IOThreads. The IOThreads are created by the group object.

Internally, IOThreads share one AioContext. This is to make it easier to adapt this to the current data plane code (see the last patch). But it is an implementation detail, and will change depending on the block layer multiqueue needs.

TODO:

- qmp_query_iothread_groups, in addition to proper QOM @child property from IOThreadGroup to its IOThread instances.
- Add virtio-scsi.
- Variant of iothread_stop_all().

Fam Zheng (5):
aio: Wrap poll parameters into AioContextPollParams
iothread: Don't error on windows
iothread: Extract iothread_start
Introduce iothread-group
virtio-blk: Add iothread-group property

 Makefile.objs                   |   2 +-
 hw/block/dataplane/virtio-blk.c |  18 ++--
 hw/block/virtio-blk.c           |   6 ++
 include/block/aio.h             |  18 ++--
 include/hw/virtio/virtio-blk.h  |   2 +
 include/sysemu/iothread.h       |  35 ++++++-
 iothread-group.c                | 210 ++++++++++++++++++++++++++++++++++++++++
 iothread.c                      |  97 +++++++++----------
 util/aio-posix.c                |  10 +-
 util/aio-win32.c                |   8 +-
 10 files changed, 328 insertions(+), 78 deletions(-)
 create mode 100644 iothread-group.c
Signature · 1 line
2.9.4