All of lore.kernel.org
 help / color / mirror / Atom feed
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
Subject: Re: [Qemu-devel] [RFC PATCH v0] spapr: Disable CPU unplug in TCG mode
Date: Wed, 21 Sep 2016 15:31:00 +1000	[thread overview]
Message-ID: <20160921053100.GZ20488@umbus> (raw)
In-Reply-To: <1474433280-25652-1-git-send-email-bharata@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

On Wed, Sep 21, 2016 at 10:18:00AM +0530, Bharata B Rao wrote:
> CPU unplug doesn't work in TCG mode currently and causes frequent system
> freeze. In addition to other potential problems, the main problem arises
> of out the requirement to support synchronous removal of a CPU thread.
> The CPU thread that performs the cleanup of the unplugged CPU, kicks and
> waits for the unplugged CPU thread to finish. This wait never finishes in
> TCG mode when the waiting thread and the unplugged CPU thread are one and
> the same.
> 
> So wait till proper MTTCG support is available before enabling
> CPU unplug in TCG mode.

MTTCG seems like a very big hammer to fix this with.  Surely we could
come up with a simpler interlock that would work for TCG in the
meantime.

> 
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> ---
>  hw/ppc/spapr.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index ca77bb0..d7864c6 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2300,6 +2300,10 @@ static void spapr_machine_device_unplug(HotplugHandler *hotplug_dev,
>              error_setg(errp, "CPU hot unplug not supported on this machine");
>              return;
>          }
> +        if (!kvm_enabled()) {
> +            error_setg(errp, "CPU hot unplug not supported in TCG mode");
> +            return;
> +        }
>          spapr_core_unplug(hotplug_dev, dev, errp);
>      }
>  }

-- 
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 --]

  parent reply	other threads:[~2016-09-21  5:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21  4:48 [Qemu-devel] [RFC PATCH v0] spapr: Disable CPU unplug in TCG mode Bharata B Rao
2016-09-21  5:02 ` no-reply
2016-09-21  5:05   ` Fam Zheng
2016-09-21  5:31 ` David Gibson [this message]
2016-09-30  3:22   ` Bharata B Rao

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=20160921053100.GZ20488@umbus \
    --to=david@gibson.dropbear.id.au \
    --cc=bharata@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.