NOHZ_FULL, isolated CPUs and reading CPU MSR
NOHZ_FULL, isolated CPUs and reading CPU MSR
Posted Apr 4, 2020 1:57 UTC (Sat) by vstinner (subscriber, #42675)Parent article: Frequency-invariant utilization tracking for x86
If an isolated CPU never gets the scheduler interrupt, its workload is ignored to decide the P-state of the CPU. As a consequence, the performance of isolated CPUs only rely on the non-isolated CPUs workload. For a benchmark, it means that a benchmark can become suddenly 2x faster or slower...
How I found this issue in practice: https://vstinner.github.io/intel-cpus-part2.html
The maintainer of the intel_pstate driver just told me that he never tested isolated CPUs with NOHZ_FULL. Kernel realtime developers told me that NOHZ_FULL cannot work with intel_pstate by design.
Workaround: don't use NOHZ_FULL or use fixed CPU frequency.
Posted Apr 4, 2020 18:42 UTC (Sat)
by jcm (subscriber, #18262)
[Link] (1 responses)
Posted Apr 6, 2020 4:06 UTC (Mon)
by florianfainelli (subscriber, #61952)
[Link]
Posted Apr 8, 2020 14:20 UTC (Wed)
by nix (subscriber, #2304)
[Link] (4 responses)
Posted Apr 8, 2020 22:26 UTC (Wed)
by vstinner (subscriber, #42675)
[Link] (3 responses)
Sorry, my sentence is wrong: the issue is not NOHZ_FULL alone, but NOHZ_FULL+isolated CPUs. I understood that intel_pstate is not compatible with isolated CPUs using NOHZ_FULL.
Posted Apr 9, 2020 0:44 UTC (Thu)
by nix (subscriber, #2304)
[Link] (2 responses)
Posted Apr 18, 2020 18:20 UTC (Sat)
by zlynx (guest, #2285)
[Link] (1 responses)
Of course they also set performance to maximum, so this wouldn't affect power and frequency management.
Anyway, I believe this is more common than you may think.
Posted Jun 2, 2020 1:36 UTC (Tue)
by nix (subscriber, #2304)
[Link]
(What they are presumably actually looking for here is CPU affinity with QEMU to try to keep a roughly 1:1 mapping between QEMU vCPU cores and real CPU cores. There were patches to do it inside QEMU but they never made it upstream and eventually bitrotted: it looks like libvirt does it from outside QEMU by brute force and cgroups.)
NOHZ_FULL, isolated CPUs and reading CPU MSR
NOHZ_FULL, isolated CPUs and reading CPU MSR
NOHZ_FULL, isolated CPUs and reading CPU MSR
Kernel realtime developers told me that NOHZ_FULL cannot work with intel_pstate by design.
Really? This configuration is the common case for every distro kernel I checked. Sounds like we need better communication somewhere...
NOHZ_FULL, isolated CPUs and reading CPU MSR
NOHZ_FULL, isolated CPUs and reading CPU MSR
NOHZ_FULL, isolated CPUs and reading CPU MSR
NOHZ_FULL, isolated CPUs and reading CPU MSR