aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-12-05 19:20:12 +0200
committerKevin Wolf <kwolf@redhat.com>2011-12-15 12:40:33 +0100
commit39a7a362e16bb27e98738d63f24d1ab5811e26a8 (patch)
treef9f9a0bb72461a25ecafcf0d9e5986573ad9ff4f /block
parentc2c9a46609164a36b477f6cff1d10ed27a6b53fc (diff)
coroutine: switch per-thread free pool to a global pool
ucontext-based coroutines use a free pool to reduce allocations and deallocations of coroutine objects. The pool is per-thread, presumably to improve locality. However, as coroutines are usually allocated in a vcpu thread and freed in the I/O thread, the pool accounting gets screwed up and we end allocating and freeing a coroutine for every I/O request. This is expensive since large objects are allocated via the kernel, and are not cached by the C runtime. Fix by switching to a global pool. This is safe since we're protected by the global mutex. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions