From: David Gibson <david@gibson.dropbear.id.au>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Nathan Lynch <nathanl@linux.ibm.com>,
Gautham R Shenoy <ego@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Daniel Henrique Barboza <danielhb413@gmail.com>,
Valentin Schneider <valentin.schneider@arm.com>,
hegdevasant@linux.vnet.ibm.com, qemu-ppc@nongnu.org,
Cedric Le Goater <clg@kaod.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 1/3] powerpc/smp: Reintroduce cpu_core_mask
Date: Mon, 19 Apr 2021 11:17:37 +1000 [thread overview]
Message-ID: <YHzaMVm3nJfTtDrs@yekko.fritz.box> (raw)
In-Reply-To: <20210416054549.GF2633526@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3670 bytes --]
On Fri, Apr 16, 2021 at 11:15:49AM +0530, Srikar Dronamraju wrote:
> * David Gibson <david@gibson.dropbear.id.au> [2021-04-16 13:21:34]:
>
> Thanks for having a look at the patches.
>
> > On Thu, Apr 15, 2021 at 05:39:32PM +0530, Srikar Dronamraju wrote:
> > > Daniel reported that with Commit 4ca234a9cbd7 ("powerpc/smp: Stop
> > > updating cpu_core_mask") QEMU was unable to set single NUMA node SMP
> > > topologies such as:
> > > -smp 8,maxcpus=8,cores=2,threads=2,sockets=2
> > > i.e he expected 2 sockets in one NUMA node.
> >
> > Well, strictly speaking, you can still set that toplogy in qemu but a
> > PAPR guest with that commit will show as having 1 socket in lscpu and
> > similar things.
> >
>
> Right, I did mention the o/p of lscpu in QEMU with the said commit and
> with the new patches in the cover letter. Somehow I goofed up the cc
> list for the cover letter.
>
> Reference for the cover letter:
> https://lore.kernel.org/linuxppc-dev/20210415120934.232271-1-srikar@linux.vnet.ibm.com/t/#u
>
> > Basically, this is because PAPR has no meaningful distinction between
> > cores and sockets. So it's kind of a cosmetic problem, but it is a
> > user-unexpected behaviour that it would be nice to avoid if it's not
> > excessively difficult.
> >
> > > The above commit helped to reduce boot time on Large Systems for
> > > example 4096 vCPU single socket QEMU instance. PAPR is silent on
> > > having more than one socket within a NUMA node.
> > >
> > > cpu_core_mask and cpu_cpu_mask for any CPU would be same unless the
> > > number of sockets is different from the number of NUMA nodes.
> >
> > Number of sockets being different from number of NUMA nodes is routine
> > in qemu, and I don't think it's something we should enforce.
> >
> > > One option is to reintroduce cpu_core_mask but use a slightly
> > > different method to arrive at the cpu_core_mask. Previously each CPU's
> > > chip-id would be compared with all other CPU's chip-id to verify if
> > > both the CPUs were related at the chip level. Now if a CPU 'A' is
> > > found related / (unrelated) to another CPU 'B', all the thread
> > > siblings of 'A' and thread siblings of 'B' are automatically marked as
> > > related / (unrelated).
> > >
> > > Also if a platform doesn't support ibm,chip-id property, i.e its
> > > cpu_to_chip_id returns -1, cpu_core_map holds a copy of
> > > cpu_cpu_mask().
> >
> > Yeah, the other weirdness here is that ibm,chip-id isn't a PAPR
> > property at all - it was added for powernv. We then added it to qemu
> > for PAPR guests because that was the way at the time to get the guest
> > to advertise the expected number of sockets. It therefore basically
> > *only* exists on PAPR/qemu for that purpose, so if it's not serving it
> > we need to come up with something else.
> >
>
> Do you have ideas on what that something could be like?
Not really, sorry.
> So if that's
> more beneficial then we could move over to that scheme. Also apart
> from ibm,chip-id being not a PAPR property, do you have any other
> concerns with it.
I think if we can keep ibm,chip-id doing this job, that would be
simplest - as long as our PAPR usage isn't implying semantics which
contradict what it does on powernv. AIUI Cédric thought it did that,
but with further discussion it seems like that might have been a
misunderstanding incorrectly conflating chip-id with NUMA nodes.
--
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: 833 bytes --]
next prev parent reply other threads:[~2021-04-19 3:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 12:09 [PATCH 0/3] Reintroduce cpu_core_mask Srikar Dronamraju
2021-04-15 12:09 ` [PATCH 1/3] powerpc/smp: " Srikar Dronamraju
2021-04-15 17:11 ` Gautham R Shenoy
2021-04-15 17:36 ` Srikar Dronamraju
2021-04-16 3:21 ` David Gibson
2021-04-16 5:45 ` Srikar Dronamraju
2021-04-19 1:17 ` David Gibson [this message]
2021-04-15 12:09 ` [PATCH 2/3] Revert "powerpc/topology: Update topology_core_cpumask" Srikar Dronamraju
2021-04-15 12:09 ` [PATCH 3/3] powerpc/smp: Cache CPU to chip lookup Srikar Dronamraju
2021-04-15 17:19 ` Gautham R Shenoy
2021-04-15 17:51 ` Srikar Dronamraju
2021-04-16 15:57 ` Gautham R Shenoy
2021-04-16 16:57 ` Srikar Dronamraju
2021-04-19 1:19 ` David Gibson
2021-04-15 12:17 ` [PATCH 0/3] Reintroduce cpu_core_mask Daniel Henrique Barboza
2021-04-19 4:00 ` Michael Ellerman
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=YHzaMVm3nJfTtDrs@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=ego@linux.vnet.ibm.com \
--cc=hegdevasant@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@kernel.org \
--cc=nathanl@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=qemu-ppc@nongnu.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=valentin.schneider@arm.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).