From: Peter Maydell <peter.maydell@linaro.org>
To: linzhecheng <linzhecheng@huawei.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
wangxinxin.wang@huawei.com, Richard Henderson <rth@twiddle.net>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] cpus: remove useless cond signal
Date: Mon, 14 May 2018 13:19:04 +0100 [thread overview]
Message-ID: <CAFEAcA8X_TG0EGLWzr=SuBqWizcRWw6ed-eqTgM9XihaTa8PPA@mail.gmail.com> (raw)
In-Reply-To: <20180514115557.13524-1-linzhecheng@huawei.com>
On 14 May 2018 at 12:55, linzhecheng <linzhecheng@huawei.com> wrote:
> commit dbadee4 removed qemu_cond_wait in cpu_remove_sync, so it is
> useless to keep qemu_cond_signal here.
>
> Signed-off-by: linzhecheng <linzhecheng@huawei.com>
>
> diff --git a/cpus.c b/cpus.c
> index 5bcd3ecf38..c7262484f3 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1222,7 +1222,6 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
>
> qemu_kvm_destroy_vcpu(cpu);
> cpu->created = false;
> - qemu_cond_signal(&qemu_cpu_cond);
> qemu_mutex_unlock_iothread();
> rcu_unregister_thread();
> return NULL;
> --
> 2.12.2.windows.2
At the moment we seem to have an invariant "everywhere we
set cpu->created = false we also signal the qemu_cpu_cond".
If signalling the condition is no longer necessary in this
function, is it also no longer necessary in all the other
places where we do it after setting created = false ?
thanks
-- PMM
prev parent reply other threads:[~2018-05-14 12:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 11:55 [Qemu-devel] [PATCH] cpus: remove useless cond signal linzhecheng
2018-05-14 12:19 ` Peter Maydell [this message]
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='CAFEAcA8X_TG0EGLWzr=SuBqWizcRWw6ed-eqTgM9XihaTa8PPA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=crosthwaite.peter@gmail.com \
--cc=linzhecheng@huawei.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=wangxinxin.wang@huawei.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).