]> git.proxmox.com Git - mirror_qemu.git/commit
coroutine: try harder not to delete coroutines
authorPeter Lieven <pl@kamp.de>
Tue, 2 Dec 2014 11:05:50 +0000 (12:05 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 13 Jan 2015 13:43:29 +0000 (13:43 +0000)
commit51a2219bdceed16e81c6e2e2f08aed39c579728f
treee2fd7192232fa66fbed743b304a7b776d4140b93
parent66552b894bd68dd6539fb6d656ad2c21bdd6acbe
coroutine: try harder not to delete coroutines

Placing coroutines on the global pool should be preferrable, because it
can help all threads.  But if the global pool is full, we can still
try to save some allocations by stashing completed coroutines on the
local pool.  This is quite cheap too, because it does not require
atomic operations, and provides a gain of 15% in the best case.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1417518350-6167-8-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-coroutine.c