Re: [tip: sched/core] sched/fair: Only update stats for allowed CPUs when looking for dst group
From: Erwan Velu
Date: Tue Jul 07 2026 - 04:15:59 EST
Hi Adam, Peter,
I've been chasing a performance bug on my systems and found that this
commit was a
real game-changer on my production server.
I'm using dual AMD Turin 9845 (160 cores each), with the following
NUMA topology:
Socket 0:
NUMA node0 CPU(s): 0-15,320-335
NUMA node1 CPU(s): 16-31,336-351
NUMA node2 CPU(s): 32-47,352-367
NUMA node3 CPU(s): 48-63,368-383
NUMA node4 CPU(s): 64-79,384-399
NUMA node5 CPU(s): 80-95,400-415
NUMA node6 CPU(s): 96-111,416-431
NUMA node7 CPU(s): 112-127,432-447
NUMA node8 CPU(s): 128-143,448-463
NUMA node9 CPU(s): 144-159,464-479
Socket 1:
NUMA node10 CPU(s): 160-175,480-495
NUMA node11 CPU(s): 176-191,496-511
NUMA node12 CPU(s): 192-207,512-527
NUMA node13 CPU(s): 208-223,528-543
NUMA node14 CPU(s): 224-239,544-559
NUMA node15 CPU(s): 240-255,560-575
NUMA node16 CPU(s): 256-271,576-591
NUMA node17 CPU(s): 272-287,592-607
NUMA node18 CPU(s): 288-303,608-623
NUMA node19 CPU(s): 304-319,624-639
I was able to setup a reproducer by using the wonderful stress-ng tool
like the following :
[root@host]$ stress-ng --taskset 0-175 --timeout 30 --metrics
--cpu-method float128 --cpu 176
On my 6.18.38 and 6.12.95, the latest LTS at the date, I have very
weird performance like :
stress-ng: info: [11329] dispatching hogs: 176 cpu
stress-ng: metrc: [11329] stressor bogo ops real time usr
time sys time bogo ops/s bogo ops/s CPU used per RSS Max
stress-ng: metrc: [11329] (secs)
(secs) (secs) (real time) (usr+sys time) instance (%)
(KB)
stress-ng: metrc: [11329] cpu 5515290 29.97
1311.82 0.02 184034.19 4204.23 24.87
0
stress-ng: info: [11329] skipped: 0
/!\ Stress-ng reports 25% CPU usage, resulting in only 5M bogo-ops.
When applying this patch on top of the two LTS releases, I get the
following result:
stress-ng: info: [11329] dispatching hogs: 176 cpu
stress-ng: metrc: [11329] stressor bogo ops real time usr
time sys time bogo ops/s bogo ops/s CPU used per RSS Max
stress-ng: metrc: [11329] (secs)
(secs) (secs) (real time) (usr+sys time) instance (%)
(KB)
stress-ng: metrc: [11329] cpu 19306125 29.99
5236.45 0.06 643718.82 3686.83 99.20
0
stress-ng: info: [11329] skipped: 0
The CPU usage gets an expected 99% and 19M+ bogo-ops.
That's a massive 4x performance impact on a CPU-bound application.
This outcome is 100% reproducible and particularly visible with this
stress-ng reproducer, but
also exists in other conditions when choosing other NUMA nodes and CPUs.
Considering the impact of this change on performance, can we request a
backport to all stable kernels?
Erwan,