Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Ryzen 2400G - > 32 cores? (Linux 5.3)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jpsollie
n00b
n00b


Joined: 17 Aug 2013
Posts: 65

PostPosted: Sat Oct 19, 2019 9:46 am    Post subject: [Solved] Ryzen 2400G - > 32 cores? (Linux 5.3) Reply with quote

Hi Everyone,

When I investigate the dmesg of my pc, I see the following entry in dmesg:
Code:

[    0.000000] smpboot: Allowing 32 CPUs, 24 hotplug CPUs
[    0.000000] [mem 0xe0000000-0xf7ffffff] available for PCI devices
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370452778343963 ns
[    0.000000] setup_percpu: NR_CPUS:32 nr_cpumask_bits:32 nr_cpu_ids:32 nr_node_ids:1
[    0.000000] percpu: Embedded 37 pages/cpu s113944 r8192 d29416 u262144
[    0.000000] pcpu-alloc: s113944 r8192 d29416 u262144 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 00 01 02 03 04 05 06 07 [0] 08 09 10 11 12 13 14 15
[    0.000000] pcpu-alloc: [0] 16 17 18 19 20 21 22 23 [0] 24 25 26 27 28 29 30 31
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 3865313


So, the 2400G is a 4-core/8thread cpu, how does it get to 32?
Lspci:

Code:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
12:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller (rev 01)
12:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller (rev 01)
12:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge (rev 01)
20:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
20:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
20:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
20:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
20:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
25:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
29:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c9)
29:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
29:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
29:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
29:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
29:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
2a:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 61)


So, could anyone tell me where those 32 cpus come from?
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...


Last edited by jpsollie on Fri Nov 15, 2019 5:57 am; edited 1 time in total
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3750
Location: Hamburg

PostPosted: Sat Oct 19, 2019 10:31 am    Post subject: Reply with quote

32 is the max as configured in the kernel .config, do a
Code:
grep processor /proc/cpuinfo
for real world values.
Back to top
View user's profile Send private message
jpsollie
n00b
n00b


Joined: 17 Aug 2013
Posts: 65

PostPosted: Sat Oct 19, 2019 10:54 am    Post subject: Reply with quote

toralf wrote:
32 is the max as configured in the kernel .config, do a
Code:
grep processor /proc/cpuinfo
for real world values.

I agree, but when putting it to 8 in the config, it gives me a message like '8/32 cpus initialized', so that confused me
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14971

PostPosted: Sat Oct 19, 2019 3:53 pm    Post subject: Reply with quote

Please show the exact confusing message and the Kconfig entries you set that are relevant to it.
Back to top
View user's profile Send private message
jpsollie
n00b
n00b


Joined: 17 Aug 2013
Posts: 65

PostPosted: Sat Oct 19, 2019 5:00 pm    Post subject: Reply with quote

Code:

[    0.000000] smpboot: 32 Processors exceeds NR_CPUS limit of 8
[    0.000000] smpboot: Allowing 8 CPUs, 0 hotplug CPUs


I guess a Kconfig is not needed here: all I did was decreasing the nr of CPUs to 8 instead of 32
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3750
Location: Hamburg

PostPosted: Sat Oct 19, 2019 5:23 pm    Post subject: Reply with quote

jpsollie wrote:
Code:

[    0.000000] smpboot: 32 Processors exceeds NR_CPUS limit of 8
[    0.000000] smpboot: Allowing 8 CPUs, 0 hotplug CPUs


I guess a Kconfig is not needed here: all I did was decreasing the nr of CPUs to 8 instead of 32
I'd disagree - the kernel seems to see 32 CPUs - you're sure about your processor? :-) eg. what does
Code:
uname -a
give?
Back to top
View user's profile Send private message
jpsollie
n00b
n00b


Joined: 17 Aug 2013
Posts: 65

PostPosted: Sun Oct 20, 2019 4:30 am    Post subject: Reply with quote

Code:

 ~ $ uname -a
Linux frisbee 5.3.6 #4 SMP Sat Oct 19 18:07:15 CEST 2019 x86_64 AMD Ryzen 5 2400GE with Radeon Vega Graphics AuthenticAMD GNU/Linux

If it was that easy, I'd probably not have asked it: guess most users are just 'happy it works' without dmesg investigation
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7506
Location: Saint Amant, Acadiana

PostPosted: Sun Oct 20, 2019 5:39 am    Post subject: Reply with quote

Do you have CPU hotplug enabled in your kernel?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
jpsollie
n00b
n00b


Joined: 17 Aug 2013
Posts: 65

PostPosted: Sun Oct 20, 2019 5:51 am    Post subject: Reply with quote

Jaglover wrote:
Do you have CPU hotplug enabled in your kernel?


Code:

$ cat .config | grep HOTPLUG
CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_HOTPLUG_IOAPIC=y
CONFIG_HOTPLUG_SMT=y
# CONFIG_MEMORY_HOTPLUG is not set
# CONFIG_HOTPLUG_PCI is not set
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set

Seems a little bit strange: debug_hotplug is listed in 'make menuconfig', but hotplug_cpu' isn't
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7368

PostPosted: Sun Oct 20, 2019 5:03 pm    Post subject: Reply with quote

It really looks odd, what you get with
Code:
grep CPU /proc/cpuinfo | wc
Back to top
View user's profile Send private message
jpsollie
n00b
n00b


Joined: 17 Aug 2013
Posts: 65

PostPosted: Sun Oct 20, 2019 6:23 pm    Post subject: Reply with quote

krinn wrote:
It really looks odd, what you get with
Code:
grep CPU /proc/cpuinfo | wc


Guess you meant 'grep processor' :
Code:

grep processor /proc/cpuinfo | wc
      8      24     112


Grep CPU outputs '0 0 0'
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 628

PostPosted: Fri Nov 15, 2019 12:06 am    Post subject: Re: Ryzen 2400G - > 32 cores? (Linux 5.3) Reply with quote

jpsollie wrote:
Hi Everyone,

When I investigate the dmesg of my pc, I see the following entry in dmesg:
Code:

[    0.000000] smpboot: Allowing 32 CPUs, 24 hotplug CPUs
[    0.000000] [mem 0xe0000000-0xf7ffffff] available for PCI devices
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370452778343963 ns
[    0.000000] setup_percpu: NR_CPUS:32 nr_cpumask_bits:32 nr_cpu_ids:32 nr_node_ids:1
[    0.000000] percpu: Embedded 37 pages/cpu s113944 r8192 d29416 u262144
[    0.000000] pcpu-alloc: s113944 r8192 d29416 u262144 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 00 01 02 03 04 05 06 07 [0] 08 09 10 11 12 13 14 15
[    0.000000] pcpu-alloc: [0] 16 17 18 19 20 21 22 23 [0] 24 25 26 27 28 29 30 31
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 3865313


Not sure what is causing the incorrect output, it's possible that it is a bug in the kernel code.

For comparison
Code:

[    0.000000] smpboot: 128 Processors exceeds NR_CPUS limit of 64
[    0.000000] smpboot: Allowing 64 CPUs, 32 hotplug CPUs
[    0.000000] [mem 0xb7b80000-0xef7fffff] available for PCI devices
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.000000] random: get_random_bytes called from start_kernel+0x88/0x43b with crng_init=0
[    0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:64 nr_node_ids:1
[    0.000000] percpu: Embedded 41 pages/cpu s127768 r8192 d31976 u262144
[    0.000000] pcpu-alloc: s127768 r8192 d31976 u262144 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 00 01 02 03 04 05 06 07 [0] 08 09 10 11 12 13 14 15
[    0.000000] pcpu-alloc: [0] 16 17 18 19 20 21 22 23 [0] 24 25 26 27 28 29 30 31
[    0.000000] pcpu-alloc: [0] 32 33 34 35 36 37 38 39 [0] 40 41 42 43 44 45 46 47
[    0.000000] pcpu-alloc: [0] 48 49 50 51 52 53 54 55 [0] 56 57 58 59 60 61 62 63
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 33000314


I'm running:
Code:
uname -a
Linux SuperTux 4.19.82-gentoo #1 SMP PREEMPT Thu Nov 14 15:38:44 MST 2019 x86_64 AMD Ryzen Threadripper 1950X 16-Core Processor AuthenticAMD GNU/Linux

Recently built and booted. Built the kernel restricting the cpu count to 64. For some strange reason it sees 128 and will only allow 64 (per setting) then hotplugs 32, which is correct.

I will need to dig through the docs to see if something was overlooked or if it is in fact a BUG.

Tango..... :?
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 628

PostPosted: Fri Nov 15, 2019 12:30 am    Post subject: Reply with quote

OK this is not a BUG and it is intended to work this way. The BIOS supports more CPU's then you have so the others are disabled.

From Bugzilla at Kernel .org
Quote:
The disabled ones are added to the number of possible CPUs in case one can add more by hotplug. (It is not as easy as adding numbers to possible CPUs but the provision is there.)

We warn there in case the user has set NR_CPUS to something lower than the actual count of CPUs present on the system so that she/he is aware at least.

So, long story short, not a bug but a provision from the BIOS. You can safely ignore it.


So one should probably set NR_CPUS in the kernel to match what their BIOS can support.

Mystery Solved..... :)
Back to top
View user's profile Send private message
jpsollie
n00b
n00b


Joined: 17 Aug 2013
Posts: 65

PostPosted: Fri Nov 15, 2019 5:58 am    Post subject: Reply with quote

Thank you!
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum