[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread f
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool |
Date: |
Fri, 28 Nov 2014 12:40:57 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Nov 27, 2014 at 11:27:06AM +0100, Peter Lieven wrote:
> diff --git a/iothread.c b/iothread.c
> index 342a23f..b53529b 100644
> --- a/iothread.c
> +++ b/iothread.c
> @@ -15,6 +15,7 @@
> #include "qom/object_interfaces.h"
> #include "qemu/module.h"
> #include "block/aio.h"
> +#include "block/coroutine.h"
> #include "sysemu/iothread.h"
> #include "qmp-commands.h"
> #include "qemu/error-report.h"
> @@ -47,6 +48,8 @@ static void *iothread_run(void *opaque)
> }
> aio_context_release(iothread->ctx);
> }
> +
> + coroutine_pool_cleanup();
> return NULL;
> }
The assumption here is that iothread_run() is the only thread function
that uses coroutines.
If another thread uses coroutines the pool will leak :(. This is one of
the challenges of thread-local storage.
pgpPh5ecXOqAE.pgp
Description: PGP signature
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, (continued)
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Peter Lieven, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Peter Lieven, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Peter Lieven, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Paolo Bonzini, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Peter Lieven, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Paolo Bonzini, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Peter Lieven, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Paolo Bonzini, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Paolo Bonzini, 2014/11/28
- Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool, Peter Lieven, 2014/11/28
Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool,
Stefan Hajnoczi <=
[Qemu-devel] [RFC PATCH 1/3] Revert "coroutine: make pool size dynamic", Peter Lieven, 2014/11/27