#1070678 nproc show different cores count with /proc/cpuinfo

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
YunQiang Su
Date:
2024-05-07 03:21:03 UTC
Severity:
normal
#1070678#5
Date:
2024-05-07 03:18:52 UTC
From:
To:
CPU: AMD Ryzen 7 6800U with Radeon Graphics
Kernel version: 6.7.12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.7.12-1
(2024-04-24) x86_64 GNU/Linux


Too save power, I use the attached script to disable CPU cores, and
run it every minute
by cron. It depends `nproc` to determine the count of cores currently.

When the system is idle,  so the CPU cores is 2, and then I start to
build kernel with -j16.
And 2 more cores are enabled soon, while `nproc` always claims that
there are only 2 cores
are enabled.