qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group"
@ 2017-07-10  7:20 Fam Zheng
  2017-07-10  7:20 ` [Qemu-devel] [PATCH RFC 1/5] aio: Wrap poll parameters into AioContextPollParams Fam Zheng
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Fam Zheng @ 2017-07-10  7:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, Fam Zheng, Stefan Hajnoczi

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

-- 
2.9.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-07-14 13:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10  7:20 [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group" Fam Zheng
2017-07-10  7:20 ` [Qemu-devel] [PATCH RFC 1/5] aio: Wrap poll parameters into AioContextPollParams Fam Zheng
2017-07-11 13:34   ` Stefan Hajnoczi
2017-07-10  7:20 ` [Qemu-devel] [PATCH RFC 2/5] iothread: Don't error on windows Fam Zheng
2017-07-11 13:35   ` Stefan Hajnoczi
2017-07-10  7:20 ` [Qemu-devel] [PATCH RFC 3/5] iothread: Extract iothread_start Fam Zheng
2017-07-11 13:37   ` Stefan Hajnoczi
2017-07-10  7:20 ` [Qemu-devel] [PATCH RFC 4/5] Introduce iothread-group Fam Zheng
2017-07-11 13:48   ` Stefan Hajnoczi
2017-07-12  8:44     ` Fam Zheng
2017-07-10  7:20 ` [Qemu-devel] [PATCH RFC 5/5] virtio-blk: Add iothread-group property Fam Zheng
2017-07-10  7:46 ` [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group" Fam Zheng
2017-07-11 14:15 ` Stefan Hajnoczi
2017-07-11 15:14   ` Fam Zheng
2017-07-12 10:40     ` Stefan Hajnoczi
2017-07-11 14:58 ` Stefan Hajnoczi
2017-07-12 11:06   ` Fam Zheng
2017-07-14 13:18     ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).