Skip to content

RFC qemu-coroutine: use a ring per thread for the pool

Peter Lieven qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Revert "coroutine: make pool size dynamic"include/block/coroutine.h qemu-coroutine.c+3 -342 replies
2/3block/block-backend.c: remove coroutine pool reservationblock/block-backend.c+0 -60 replies
3/3qemu-coroutine: use a ring per thread for the poolinclude/block/coroutine.h iothread.c qemu-coroutine.c+28 -3121 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC PATCH 0/3] qemu-coroutine: use a ring per thread for the pool

This series removes the need for locking the coroutine pool. During collection of perf data it showed up that there is serious time spend in locking the coroutine pool during heavy I/O from the vServer.

This also needs serious benchmarking. Using Kevins qemu-img bench there is a 3-4% speedup. Inside vServers it seems to heavily dependend on the individual CPU and SMP configuration.

I just wanted to post these patches here to discuss if this is an idea that we should look futher into.

KNOWN ISSUES:
- the I/O thread qobject is not destroyed on qemu termination. These seems to be the case for all qobjects?! Therefore the per thread coroutine pool is not cleaned up.
- without ioeventfd there is effectively no longer a coroutine pool since the coroutines are created in a different thread then they are freed.

Peter Lieven (3):
Revert "coroutine: make pool size dynamic" block/block-backend.c: remove coroutine pool reservation
qemu-coroutine: use a ring per thread for the pool

 block/block-backend.c     |    6 ----
 include/block/coroutine.h |   13 +-------
 iothread.c                |    3 ++
 qemu-coroutine.c          |   78 +++++++++++++++------------------------------
 4 files changed, 30 insertions(+), 70 deletions(-)
Signature · 1 line
1.7.9.5