[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex |
Date: |
Tue, 2 Dec 2014 14:04:05 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 02.12.2014 um 13:13 hat Paolo Bonzini geschrieben:
>
>
> On 02/12/2014 13:09, Peter Lieven wrote:
> >>
> >> -static void __attribute__((destructor)) coroutine_pool_cleanup(void)
> >> -{
> >> - Coroutine *co;
> >> - Coroutine *tmp;
> >> -
> >> - QSLIST_FOREACH_SAFE(co, &pool, pool_next, tmp) {
> >> - QSLIST_REMOVE_HEAD(&pool, pool_next);
> >> - qemu_coroutine_delete(co);
> >> - }
> >> -
> >> - qemu_mutex_destroy(&pool_lock);
> >> -}
> >> -
> >
> > I still feel we should leave this destructor in to clean up the
> > release_pool.
>
> Why? If you run QEMU under valgrind, there are thousands of blocks that
> we do not free. Stefan/Kevin, what do you think?
The destructor doesn't seem to be doing anything but freeing memory,
which the OS can indeed do for us. I don't mind either way.
Kevin
- [Qemu-devel] [PATCH v2 0/7] coroutine: optimizations, Paolo Bonzini, 2014/12/02
- [Qemu-devel] [PATCH v2 1/7] coroutine-ucontext: use __thread, Paolo Bonzini, 2014/12/02
- [Qemu-devel] [PATCH v2 2/7] qemu-thread: add per-thread atexit functions, Paolo Bonzini, 2014/12/02
- [Qemu-devel] [PATCH v2 4/7] QSLIST: add lock-free operations, Paolo Bonzini, 2014/12/02
- [Qemu-devel] [PATCH v2 3/7] test-coroutine: avoid overflow on 32-bit systems, Paolo Bonzini, 2014/12/02
- [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex, Paolo Bonzini, 2014/12/02
[Qemu-devel] [PATCH v2 6/7] coroutine: drop qemu_coroutine_adjust_pool_size, Paolo Bonzini, 2014/12/02
[Qemu-devel] [PATCH v2 7/7] coroutine: try harder not to delete coroutines, Paolo Bonzini, 2014/12/02
Re: [Qemu-devel] [PATCH v2 0/7] coroutine: optimizations, Peter Lieven, 2014/12/11
Re: [Qemu-devel] [PATCH v2 0/7] coroutine: optimizations, Fam Zheng, 2014/12/18