qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>,
	qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] spapr: Correctly set query_hotpluggable_cpus hook based on machine version
Date: Tue, 9 Aug 2016 10:12:26 +1000	[thread overview]
Message-ID: <20160809001226.GA9057@voom.fritz.box> (raw)
In-Reply-To: <20160808104637.7a7f23a1@nial.brq.redhat.com>

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

On Mon, Aug 08, 2016 at 10:46:37AM +0200, Igor Mammedov wrote:
> On Fri, 5 Aug 2016 20:21:59 +0530
> Bharata B Rao <bharata@linux.vnet.ibm.com> wrote:
> 
> > On Fri, Aug 05, 2016 at 05:50:29PM +1000, David Gibson wrote:
> > > Prior to c8721d3 "spapr: Error out when CPU hotplug is attempted on older
> > > pseries machines", attempting to use query-hotpluggable-cpus on pseries-2.6
> > > and earlier machine types would SEGV.
> > > 
> > > That change fixed that, but due to some unexpected interactions in init
> > > order and a brown-paper-bag worthy failure to test, it accidentally
> > > disabled query-hotpluggable-cpus for all pseries machine types, including
> > > the current one which should allow it.
> > > 
> > > In fact, query_hotpluggable_cpus needs to be non-NULL when and only when
> > > the dr_cpu_enabled flag in sPAPRMachineClass is set, which makes
> > > dr_cpu_enabled itself redundant.
> > > 
> > > This patch removes dr_cpu_enabled, instead directly setting
> > > query_hotpluggable_cpus from the machine class_init functions, and using
> > > that to determine the availability of CPU hotplug when necessary.  
> > 
> > dr_cpu_enabled actually determines if CPU hotplug feature is present
> > or not. It also controls the creation of DRC-specific properties
> > in /cpus DT node like ibm,drc-indexes etc
> > 
> > query_hotpluggable_cpus just tells us if the machine supports the
> > querying of hotpluggable CPUS. query_hotpluggable_cpus definitely
> > implies dr_cpu_enabled but dr_cpu_enabled can exist on its own
> > (theoretically at the least) without query_hotpluggable_cpus.
> > 
> > So I think we should not replace dr_cpu_enabled with query_hotpluggable_cpus.
> I agree, hotplug capability shouldn't depend on availability of
> interface to operate it but rather on some platform specific bits
> which dr_cpu_enabled is (or at least looks like it's).

I still don't understand the objection here.  Once
query_hotpluggable_cpus was set correctly it really was non-NULL if
and only if dr_cpu_enabled was also true.  Are you saying there should
be an option to disable hotplug even in the newer machine types?

For now, Peter has already merged my pull request including this
patch.

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

      reply	other threads:[~2016-08-09  1:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  7:50 [Qemu-devel] [PATCH] spapr: Correctly set query_hotpluggable_cpus hook based on machine version David Gibson
2016-08-05 14:51 ` Bharata B Rao
2016-08-08  0:09   ` David Gibson
2016-08-08  8:46   ` Igor Mammedov
2016-08-09  0:12     ` 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=20160809001226.GA9057@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=imammedo@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).