From: Greg Kurz <groug@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "Cédric Le Goater" <clg@kaod.org>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
bharata@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc/pnv: fix cores per chip for multiple cpus
Date: Fri, 22 Sep 2017 13:46:02 +0200 [thread overview]
Message-ID: <20170922134602.0bdfa05e@bahia.lan> (raw)
In-Reply-To: <20170922112042.GR4998@umbus.fritz.box>
[-- Attachment #1: Type: text/plain, Size: 3516 bytes --]
On Fri, 22 Sep 2017 21:20:42 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:
> On Fri, Sep 22, 2017 at 12:46:58PM +0200, Cédric Le Goater wrote:
> > On 09/22/2017 12:12 PM, David Gibson wrote:
> > > On Fri, Sep 22, 2017 at 08:07:06AM +0200, Cédric Le Goater wrote:
> > >> On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote:
> > >>> David Gibson <david@gibson.dropbear.id.au> writes:
> > >>>
> > >>>>>>>
> > >>>>>>> As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the
> > >>>>>>> default value of 1 in vl.c. In powernv, we were setting nr-cores like
> > >>>>>>> this:
> > >>>>>>>
> > >>>>>>> object_property_set_int(chip, smp_cores, "nr-cores", &error_fatal);
> > >>>>>>>
> > >>>>>>> Even when there were multiple cpus (-smp 4), when the guest boots up, we
> > >>>>>>> just get one core (i.e. smp_cores was 1) with single thread(smp_threads
> > >>>>>>> was 1), which is wrong as per the command-line that was provided.
> > >>>>>>
> > >>>>>> Right, so, -smp 4 defaults to 4 sockets, each with 1 core of 1
> > >>>>>> thread. If you can't supply 4 sockets you should error, but you
> > >>>>>> shouldn't go and change the number of cores per socket.
> > >>>>>
> > >>>>> OK, that makes sense now. And I do see that smp_cpus is 4 in the above
> > >>>>> case. Now looking more into it, i see that powernv has something called
> > >>>>> "num_chips", isnt this same as sockets ? Do we need num_chips separately?
> > >>>>
> > >>>> Ah, yes, I see. It's probably still reasonable to keep num_chips as
> > >>>> an internal variable, rather than using (smp_cpus / smp_cores /
> > >>>> smp_threads) everywhere. But we shouldn't have it as a direct
> > >>>> user-settable property, instead setting it from the -smp command line
> > >>>> option.
> > >>>
> > >>> Something like the below works till num_chips=2, after that guest does
> > >>> not boot up. This might be some limitation within the OS, Cedric might
> > >>> have some clue.
> > >>
> > >> Some controllers might need some more tweaking, PSI, LPC, to elect a
> > >> master one.
> > >
> > > Uh.. why?
> >
> > that's not true. I managed to boot a pnv machine with 4 chips/sockets
> > each having 4 cpus using a 4.4.9-openpower2 skiroot kernel, from an
> > openpower firmare 1.10 I think. Recent openpower kernel must be using
> > some new features/instructions that we don't manage well in QEMU.
> >
> > I would need to build a kernel with more output.
> >
> > >> Anyhow I don't think we want to deduce the number of chips
> > >> from the number of cpus. These two figures are very different.
> > >
> > > How so? It's not totally perfect, but making a single chip correspond
> > > to a "socket" in qemu's (somewhat x86 centric) terminology is still a
> > > pretty good match.
> >
> > well, it would be good to be able to define chips with different
> > numbers of cpus. That is something will we want to do for sure.
>
> You mean multiple chips in a single system with non-uniform numbers of
> cores? Are there really such systems in the wild?
>
Doesn't it happen when a CPU core gets deconfigured ?
--
Gregory Kurz kurzgreg@fr.ibm.com
gkurz@linux.vnet.ibm.com
Software Engineer @ IBM/LTC http://www.ibm.com
Tel 33-5-6218-1607
"Anarchy is about taking complete responsibility for yourself."
Alan Moore.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2017-09-22 11:46 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 8:27 [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus Nikunj A Dadhania
2017-09-08 6:38 ` Cédric Le Goater
2017-09-09 7:02 ` David Gibson
2017-09-11 5:10 ` Nikunj A Dadhania
2017-09-13 7:35 ` David Gibson
2017-09-14 5:12 ` Nikunj A Dadhania
2017-09-15 6:48 ` David Gibson
2017-09-15 8:23 ` Nikunj A Dadhania
2017-09-15 8:51 ` David Gibson
2017-09-15 9:09 ` Nikunj A Dadhania
2017-09-19 8:24 ` David Gibson
2017-09-20 4:20 ` Nikunj A Dadhania
2017-09-20 4:55 ` David Gibson
2017-09-20 5:13 ` Nikunj A Dadhania
2017-09-20 6:17 ` David Gibson
2017-09-20 6:40 ` Nikunj A Dadhania
2017-09-20 6:50 ` Nikunj A Dadhania
2017-09-20 6:57 ` David Gibson
2017-09-20 7:18 ` Nikunj A Dadhania
2017-09-20 8:12 ` Cédric Le Goater
2017-09-20 11:53 ` David Gibson
2017-09-21 3:54 ` Nikunj A Dadhania
2017-09-21 5:31 ` David Gibson
2017-09-22 6:00 ` Nikunj A Dadhania
2017-09-22 6:07 ` Cédric Le Goater
2017-09-22 10:12 ` David Gibson
2017-09-22 10:46 ` Cédric Le Goater
2017-09-22 11:20 ` David Gibson
2017-09-22 11:37 ` Cédric Le Goater
2017-09-22 11:49 ` David Gibson
2017-09-22 11:46 ` Greg Kurz [this message]
2017-09-22 10:56 ` Cédric Le Goater
2017-09-22 11:06 ` Nikunj A Dadhania
2017-09-22 11:36 ` David Gibson
2017-09-21 6:04 ` Cédric Le Goater
2017-09-21 7:42 ` Igor Mammedov
2017-09-22 10:09 ` David Gibson
2017-09-22 10:08 ` David Gibson
2017-09-22 10:52 ` Cédric Le Goater
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=20170922134602.0bdfa05e@bahia.lan \
--to=groug@kaod.org \
--cc=bharata@linux.vnet.ibm.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--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).