From: Gabriel C <nix.or.die@googlemail.com>
To: Uladzislau Rezki <urezki@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
GregKroah-Hartmangregkh@linuxfoundation.org,
"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: Re: nr_cpu_ids vs AMD 3970x(32 physical CPUs)
Date: Fri, 3 Jul 2020 19:07:39 +0200 [thread overview]
Message-ID: <CAEJqkgiFFh8CvXkM4ZzXxNQmOJLL7WcgDL6rM83safNgEewZ9w@mail.gmail.com> (raw)
In-Reply-To: <20200703155749.GA6255@pc636>
Am Fr., 3. Juli 2020 um 17:58 Uhr schrieb Uladzislau Rezki <urezki@gmail.com>:
>
> Hello, folk.
Hello,
>
> I have a system based on AMD 3970x CPUs. It has 32 physical cores
> and 64 threads. It seems that "nr_cpu_ids" variable is not correctly
> set on latest 5.8-rc3 kernel. Please have a look below on dmesg output:
>
> <snip>
> urezki@pc638:~$ sudo dmesg | grep 128
> [ 0.000000] IOAPIC[0]: apic_id 128, version 33, address 0xfec00000, GSI 0-23
> [ 0.000000] smpboot: Allowing 128 CPUs, 64 hotplug CPUs
> [ 0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:128 nr_node_ids:1
> ...
> [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=128, Nodes=1
> [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=128.
> [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=128
> urezki@pc638:~$
> <snip>
>
> For example SLUB thinks that it deals with 128 CPUs in the system what is
> wrong if i do not miss something. Since nr_cpu_ids is broken(?), thus the
> "cpu_possible_mask" does not correspond to reality as well.
>
> Any thoughts?
This is not a 5.8-rc3 problem. Almost all AMD CPUs and APUs are
looking like this.
The only CPUs I own are getting that right is a dual EPYC box,
everything else is broken
regarding the right C/T & socket(s) count, and that probably bc is
using NUAM code
to have the info.
I reported that a while back and no-one ever cared.
There is even a comment in the hotplug code saying setting the wrong CPU count
is a waste of resources.
I have a 2200G is reporting 48Cores.
AMD Ryzen 7 3750H reporting twice the cores and twice the socket.
...
[ 0.040578] smpboot: Allowing 16 CPUs, 8 hotplug CPUs
...
[ 0.382122] smpboot: Max logical packages: 2
..
I boot all the boxes restricting the cores to the correct count on the
command line.
Wasted resource or not, this is still a bug IMO.
Best Regards,
Gabriel C
next prev parent reply other threads:[~2020-07-03 17:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 15:57 nr_cpu_ids vs AMD 3970x(32 physical CPUs) Uladzislau Rezki
2020-07-03 16:56 ` Peter Zijlstra
2020-07-03 17:09 ` Uladzislau Rezki
2020-07-03 17:38 ` Peter Zijlstra
2020-07-03 19:26 ` Uladzislau Rezki
2020-07-03 17:07 ` Gabriel C [this message]
2020-07-03 17:24 ` Uladzislau Rezki
2020-07-03 17:45 ` Peter Zijlstra
2020-07-03 18:36 ` Gabriel C
2020-07-03 19:05 ` peter enderborg
2020-07-03 19:28 ` Uladzislau Rezki
2020-07-03 20:08 ` Linus Torvalds
2020-07-03 21:20 ` Uladzislau Rezki
2020-07-03 21:51 ` Matthew Wilcox
2020-07-03 22:22 ` Uladzislau Rezki
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=CAEJqkgiFFh8CvXkM4ZzXxNQmOJLL7WcgDL6rM83safNgEewZ9w@mail.gmail.com \
--to=nix.or.die@googlemail.com \
--cc=GregKroah-Hartmangregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=urezki@gmail.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).