qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/3] qemu-coroutine: use a ring per thread for the pool
@ 2014-11-27 10:27 Peter Lieven
  2014-11-27 10:27 ` [Qemu-devel] [RFC PATCH 1/3] Revert "coroutine: make pool size dynamic" Peter Lieven
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Peter Lieven @ 2014-11-27 10:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, famz, benoit, ming.lei, Peter Lieven, armbru, mreitz,
	stefanha, pbonzini

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(-)

-- 
1.7.9.5

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

end of thread, other threads:[~2014-11-28 20:12 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-27 10:27 [Qemu-devel] [RFC PATCH 0/3] qemu-coroutine: use a ring per thread for the pool Peter Lieven
2014-11-27 10:27 ` [Qemu-devel] [RFC PATCH 1/3] Revert "coroutine: make pool size dynamic" Peter Lieven
2014-11-28 12:42   ` Stefan Hajnoczi
2014-11-28 12:45     ` Peter Lieven
2014-11-27 10:27 ` [Qemu-devel] [RFC PATCH 2/3] block/block-backend.c: remove coroutine pool reservation Peter Lieven
2014-11-27 10:27 ` [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool Peter Lieven
2014-11-27 16:40   ` Paolo Bonzini
2014-11-28  8:13     ` Peter Lieven
     [not found]       ` <54784E55.6060405@redhat.com>
2014-11-28 10:37         ` Peter Lieven
2014-11-28 11:14           ` Paolo Bonzini
2014-11-28 11:21             ` Peter Lieven
2014-11-28 11:23               ` Paolo Bonzini
2014-11-28 11:27                 ` Peter Lieven
2014-11-28 11:32                 ` Peter Lieven
2014-11-28 11:46                   ` Peter Lieven
2014-11-28 12:26                     ` Paolo Bonzini
2014-11-28 12:39                       ` Peter Lieven
2014-11-28 12:45                         ` Paolo Bonzini
2014-11-28 12:49                           ` Peter Lieven
2014-11-28 12:56                             ` Paolo Bonzini
2014-11-28 13:17                           ` Peter Lieven
2014-11-28 14:17                             ` Paolo Bonzini
2014-11-28 20:11                               ` Peter Lieven
2014-11-28 13:13                         ` Peter Lieven
2014-11-28 12:21                   ` Paolo Bonzini
2014-11-28 12:26                     ` Peter Lieven
2014-11-28 12:40   ` 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).