From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: ming.lei@canonical.com, Peter Lieven <pl@kamp.de>,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex
Date: Tue, 2 Dec 2014 14:04:05 +0100 [thread overview]
Message-ID: <20141202130405.GI7283@noname.str.redhat.com> (raw)
In-Reply-To: <547DACF9.2090106@redhat.com>
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
next prev parent reply other threads:[~2014-12-02 13:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 11:05 [Qemu-devel] [PATCH v2 0/7] coroutine: optimizations Paolo Bonzini
2014-12-02 11:05 ` [Qemu-devel] [PATCH v2 1/7] coroutine-ucontext: use __thread Paolo Bonzini
2014-12-02 11:05 ` [Qemu-devel] [PATCH v2 2/7] qemu-thread: add per-thread atexit functions Paolo Bonzini
2014-12-02 11:05 ` [Qemu-devel] [PATCH v2 3/7] test-coroutine: avoid overflow on 32-bit systems Paolo Bonzini
2014-12-02 11:05 ` [Qemu-devel] [PATCH v2 4/7] QSLIST: add lock-free operations Paolo Bonzini
2014-12-02 11:05 ` [Qemu-devel] [PATCH v2 5/7] coroutine: rewrite pool to avoid mutex Paolo Bonzini
2014-12-02 12:09 ` Peter Lieven
2014-12-02 12:13 ` Paolo Bonzini
2014-12-02 12:18 ` Peter Lieven
2014-12-02 12:32 ` Paolo Bonzini
2014-12-02 13:04 ` Kevin Wolf [this message]
2014-12-02 11:05 ` [Qemu-devel] [PATCH v2 6/7] coroutine: drop qemu_coroutine_adjust_pool_size Paolo Bonzini
2014-12-02 11:05 ` [Qemu-devel] [PATCH v2 7/7] coroutine: try harder not to delete coroutines Paolo Bonzini
2014-12-11 13:55 ` [Qemu-devel] [PATCH v2 0/7] coroutine: optimizations Peter Lieven
2014-12-15 21:35 ` Paolo Bonzini
2014-12-18 10:06 ` Fam Zheng
2015-01-06 15:39 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141202130405.GI7283@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=ming.lei@canonical.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).