From: David Gibson <david@gibson.dropbear.id.au>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, pbonzini@redhat.com,
nikunj@linux.vnet.ibm.com, alex.bennee@linaro.org
Subject: Re: [Qemu-devel] [PATCH] cpus: Fix CPU unplug for MTTCG
Date: Tue, 18 Apr 2017 12:15:14 +1000 [thread overview]
Message-ID: <20170418021514.GB12235@umbus.fritz.box> (raw)
In-Reply-To: <1492069906-11300-1-git-send-email-bharata@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
On Thu, Apr 13, 2017 at 01:21:46PM +0530, Bharata B Rao wrote:
> Ensure that the unplugged CPU thread is destroyed and the waiting
> thread is notified about it. This is needed for CPU unplug to work
> correctly in MTTCG mode.
>
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Applied to ppc-for-2.10, thanks.
> ---
> cpus.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/cpus.c b/cpus.c
> index 740b8dc..79f780b 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1483,6 +1483,12 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
> /* Ignore everything else? */
> break;
> }
> + } else if (cpu->unplug) {
> + qemu_tcg_destroy_vcpu(cpu);
> + cpu->created = false;
> + qemu_cond_signal(&qemu_cpu_cond);
> + qemu_mutex_unlock_iothread();
> + return NULL;
> }
>
> atomic_mb_set(&cpu->exit_request, 0);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2017-04-18 3:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 7:51 [Qemu-devel] [PATCH] cpus: Fix CPU unplug for MTTCG Bharata B Rao
2017-04-18 2:15 ` David Gibson [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=20170418021514.GB12235@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=alex.bennee@linaro.org \
--cc=bharata@linux.vnet.ibm.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).