From: Igor Mammedov <imammedo@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [RFC 1/4] numa, spapr: add thread-id in the possible_cpus list
Date: Wed, 13 Feb 2019 13:16:46 +0100 [thread overview]
Message-ID: <20190213131646.72641f94@redhat.com> (raw)
In-Reply-To: <0a8d418d-61e3-f958-c73f-f7dd9ab7b7bb@redhat.com>
On Wed, 13 Feb 2019 10:08:24 +0100
Laurent Vivier <lvivier@redhat.com> wrote:
> On 13/02/2019 09:42, Igor Mammedov wrote:
> > On Wed, 13 Feb 2019 12:25:45 +1100
> > David Gibson <david@gibson.dropbear.id.au> wrote:
> >
> >> On Tue, Feb 12, 2019 at 10:48:24PM +0100, Laurent Vivier wrote:
> >>> spapr_possible_cpu_arch_ids() counts only cores, and so
> >>> the number of available CPUs is the number of vCPU divided
> >>> by smp_threads.
> >>>
> >>> ... -smp 4,maxcpus=8,cores=2,threads=2,sockets=2 -numa node,cpus=0,cpus=1 \
> >>> -numa node,cpus=3,cpus=4 \
> >>> -numa node -numa node
> >>>
> >>> This generates (info hotpluggable-cpus)
> >>>
> >>> node-id: 0 core-id: 0 thread-id: 0 [thread-id: 1]
> >>> node-id: 0 core-id: 6 thread-id: 0 [thread-id: 1]
> >>> node-id: 1 core-id: 2 thread-id: 0 [thread-id: 1]
> >>> node-id: 1 core-id: 4 thread-id: 0 [thread-id: 1]
> >>>
> >>> And this command line generates the following error:
> >>>
> >>> CPU(s) not present in any NUMA nodes: CPU 3 [core-id: 6]
> >>>
> >>> That is wrong because CPU 3 [core-id: 6] is assigned to node-id 0
> >>> Moreover "cpus=4" is not valid, because it means core-id 8 but
> >>> maxcpus is 8.
> >>>
> >>> With this patch we have now:
> >>>
> >>> node-id: 0 core-id: 0 thread-id: 0
> >>> node-id: 0 core-id: 0 thread-id: 1
> >>> node-id: 0 core-id: 1 thread-id: 0
> >>> node-id: 1 core-id: 1 thread-id: 1
> >>> node-id: 0 core-id: 2 thread-id: 1
> >>> node-id: 1 core-id: 2 thread-id: 0
> >>> node-id: 0 core-id: 3 thread-id: 1
> >>> node-id: 0 core-id: 3 thread-id: 0
> >>
> >> I'm afraid this is not the right solution. The point of the
> >> hotpluggable cpus table is that it has exactly one entry for each
> >> hotpluggable unit. For PAPR that's a core, not a thread.
> >>
> >> So, the problem is with how the NUMA configuration code is
> >> interpreting possible-cpus, not how the machine is building the table.
> >
> > I'd suggest to deprecate/remove 'cpus' suboption in -numa.
> > One should use '-numa cpu' instead, which is written with
> > possible_cpus in mind.
>
> I agree.
>
> Should I keep the patch to remove the incomplete CPU mapping support?
Considering code path didn't go through deprecation process (we didn't have it back then), lets keep it for now and deprecate option properly first.
Once deprecation period ends we well remove all related code at once.
Maybe amend affected/add error messages that it's been deprecated
and will be removed soon and point out to replacement option.
> Thanks,
> Laurent
next prev parent reply other threads:[~2019-02-13 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 21:48 [Qemu-devel] [RFC 0/4] numa, spapr: add thread-id in the possible_cpus list Laurent Vivier
2019-02-12 21:48 ` [Qemu-devel] [RFC 1/4] " Laurent Vivier
2019-02-13 1:25 ` David Gibson
2019-02-13 8:42 ` Igor Mammedov
2019-02-13 9:08 ` Laurent Vivier
2019-02-13 12:16 ` Igor Mammedov [this message]
2019-02-12 21:48 ` [Qemu-devel] [RFC 2/4] numa: exit on incomplete CPU mapping Laurent Vivier
2019-02-12 21:48 ` [Qemu-devel] [RFC 3/4] numa: move cpu_slot_to_string() upper in the function Laurent Vivier
2019-02-12 21:48 ` [Qemu-devel] [RFC 4/4] numa: check threads of the same core are on the same node Laurent Vivier
2019-02-13 1:30 ` David Gibson
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=20190213131646.72641f94@redhat.com \
--to=imammedo@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.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).