Re: [PATCH 0/4] sched: Various reweight_entity() fixes

From: K Prateek Nayak

Date: Mon Feb 16 2026 - 23:21:09 EST


Hello Peter,

On 1/30/2026 3:04 PM, Peter Zijlstra wrote:
> Two issues related to reweight_entity() were raised; poking at all that got me
> these patches.
>
> They're in queue.git/sched/core and I spend most of yesterday staring at traces
> trying to find anything wrong. So far, so good.
>
> Please test.

For queue:sched/core at commit bdba3187771c ("sched/fair: Use full
weight to __calc_delta()"), here are the results:

o tl;dr

No consistent regressions observed so far. Ones that have a large
%diff either have a small baseline (like < 10us latency for schbench)
or have a large CV (like for 16-groups of hackbench).

Feel free to include:

Tested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>


o Full results

Baseline was commit cee73b1e840c ("Merge tag 'riscv-for-linus-7.0-mw1'
of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux"). Testing
was done on a 2 x 128C/256T 4th Generation EPYC system (Zen4c) with
boost enabled and C2 disabled.

==================================================================
Test : hackbench
Units : Normalized time in seconds
Interpretation: Lower is better
Statistic : AMean
==================================================================
Case: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1-groups 1.00 [ -0.00](11.97) 1.09 [ -8.80](15.94)
2-groups 1.00 [ -0.00](14.01) 1.07 [ -7.40]( 8.55)
4-groups 1.00 [ -0.00]( 8.54) 0.98 [ 1.60]( 6.49)
8-groups 1.00 [ -0.00]( 2.78) 1.03 [ -3.01]( 2.35)
16-groups 1.00 [ -0.00]( 3.64) 1.08 [ -7.55]( 7.69)


==================================================================
Test : tbench
Units : Normalized throughput
Interpretation: Higher is better
Statistic : AMean
==================================================================
Clients: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1 1.00 [ 0.00]( 0.20) 1.01 [ 1.04]( 0.06)
2 1.00 [ 0.00]( 0.37) 1.01 [ 1.22]( 0.07)
4 1.00 [ 0.00]( 0.37) 1.02 [ 1.53]( 0.35)
8 1.00 [ 0.00]( 0.43) 1.01 [ 1.10]( 0.57)
16 1.00 [ 0.00]( 0.11) 1.01 [ 0.83]( 0.25)
32 1.00 [ 0.00]( 1.61) 1.01 [ 0.86]( 0.57)
64 1.00 [ 0.00]( 0.19) 1.00 [ 0.21]( 1.48)
128 1.00 [ 0.00]( 0.22) 0.99 [ -1.23]( 1.53)
256 1.00 [ 0.00]( 0.22) 1.01 [ 0.58]( 0.42)
512 1.00 [ 0.00]( 2.23) 1.02 [ 1.83]( 3.35)
1024 1.00 [ 0.00]( 0.58) 1.00 [ 0.10]( 0.45)
2048 1.00 [ 0.00]( 0.46) 1.01 [ 0.51]( 0.07)


==================================================================
Test : stream-10
Units : Normalized Bandwidth, MB/s
Interpretation: Higher is better
Statistic : HMean
==================================================================
Test: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
Copy 1.00 [ 0.00]( 0.94) 1.00 [ -0.31]( 1.61)
Scale 1.00 [ 0.00]( 0.85) 1.00 [ -0.45]( 2.04)
Add 1.00 [ 0.00]( 0.84) 0.99 [ -0.55]( 1.77)
Triad 1.00 [ 0.00]( 0.78) 1.00 [ -0.46]( 1.63)


==================================================================
Test : stream-100
Units : Normalized Bandwidth, MB/s
Interpretation: Higher is better
Statistic : HMean
==================================================================
Test: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
Copy 1.00 [ 0.00]( 1.16) 1.00 [ 0.34]( 0.45)
Scale 1.00 [ 0.00]( 1.53) 1.01 [ 0.59]( 0.53)
Add 1.00 [ 0.00]( 1.14) 1.01 [ 0.60]( 0.47)
Triad 1.00 [ 0.00]( 1.14) 1.01 [ 0.52]( 0.34)


==================================================================
Test : netperf
Units : Normalized Througput
Interpretation: Higher is better
Statistic : AMean
==================================================================
Clients: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1-clients 1.00 [ 0.00]( 0.14) 1.01 [ 0.96]( 0.10)
2-clients 1.00 [ 0.00]( 0.34) 1.01 [ 0.92]( 0.24)
4-clients 1.00 [ 0.00]( 0.13) 1.01 [ 0.71]( 0.94)
8-clients 1.00 [ 0.00]( 0.46) 1.01 [ 0.69]( 0.27)
16-clients 1.00 [ 0.00]( 0.62) 1.01 [ 0.74]( 0.91)
32-clients 1.00 [ 0.00]( 1.19) 1.01 [ 1.04]( 1.19)
64-clients 1.00 [ 0.00]( 1.81) 1.01 [ 0.62]( 1.64)
128-clients 1.00 [ 0.00]( 1.90) 1.00 [ 0.30]( 1.93)
256-clients 1.00 [ 0.00]( 1.76) 1.00 [ 0.27]( 1.75)
512-clients 1.00 [ 0.00]( 6.23) 0.99 [ -0.52]( 5.66)
768-clients 1.00 [ 0.00](33.00) 0.99 [ -0.91](34.32)
1024-clients 1.00 [ 0.00](38.21) 1.00 [ -0.18](32.98)


==================================================================
Test : schbench
Units : Normalized 99th percentile latency in us
Interpretation: Lower is better
Statistic : Median
==================================================================
#workers: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1 1.00 [ -0.00](15.02) 1.47 [-47.06](32.99)
2 1.00 [ -0.00](17.83) 0.97 [ 2.94]( 4.58)
4 1.00 [ -0.00](12.22) 1.00 [ -0.00]( 3.07)
8 1.00 [ -0.00]( 2.38) 1.00 [ -0.00]( 2.38)
16 1.00 [ -0.00]( 1.92) 1.08 [ -7.69]( 3.15)
32 1.00 [ -0.00]( 2.37) 1.00 [ -0.00]( 0.78)
64 1.00 [ -0.00]( 0.85) 1.01 [ -0.85]( 3.92)
128 1.00 [ -0.00]( 1.21) 1.00 [ -0.48]( 1.47)
256 1.00 [ -0.00]( 0.39) 1.00 [ -0.00](12.20)
512 1.00 [ -0.00]( 0.20) 1.02 [ -2.07]( 2.04)
768 1.00 [ -0.00]( 5.68) 0.97 [ 3.11]( 7.62)
1024 1.00 [ -0.00]( 4.23) 1.01 [ -0.77]( 4.71)


==================================================================
Test : new-schbench-requests-per-second
Units : Normalized Requests per second
Interpretation: Higher is better
Statistic : Median
==================================================================
#workers: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1 1.00 [ 0.00]( 0.00) 1.00 [ 0.00]( 0.00)
2 1.00 [ 0.00]( 0.15) 1.00 [ -0.29]( 0.00)
4 1.00 [ 0.00]( 0.00) 1.00 [ -0.29]( 0.00)
8 1.00 [ 0.00]( 0.00) 1.00 [ -0.29]( 0.00)
16 1.00 [ 0.00]( 0.15) 1.00 [ -0.29]( 0.15)
32 1.00 [ 0.00]( 0.15) 0.99 [ -0.59]( 0.15)
64 1.00 [ 0.00]( 0.15) 0.99 [ -0.59]( 0.00)
128 1.00 [ 0.00](13.29) 0.84 [-16.00](16.15)
256 1.00 [ 0.00]( 0.00) 1.00 [ 0.00]( 0.00)
512 1.00 [ 0.00]( 1.72) 1.00 [ 0.00]( 1.26)
768 1.00 [ 0.00]( 0.44) 0.99 [ -1.18]( 0.00)
1024 1.00 [ 0.00]( 0.37) 0.99 [ -0.54]( 0.42)


==================================================================
Test : new-schbench-wakeup-latency
Units : Normalized 99th percentile latency in us
Interpretation: Lower is better
Statistic : Median
==================================================================
#workers: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1 1.00 [ -0.00](14.91) 1.25 [-25.00](11.07)
2 1.00 [ -0.00](18.20) 1.00 [ -0.00]( 4.43)
4 1.00 [ -0.00](15.10) 0.92 [ 7.69]( 9.11)
8 1.00 [ -0.00]( 4.84) 1.00 [ -0.00]( 0.00)
16 1.00 [ -0.00]( 0.00) 1.09 [ -9.09]( 4.43)
32 1.00 [ -0.00]( 4.84) 0.91 [ 9.09]( 0.00)
64 1.00 [ -0.00](10.68) 1.00 [ -0.00]( 5.53)
128 1.00 [ -0.00]( 9.68) 1.20 [-20.00]( 9.11)
256 1.00 [ -0.00]( 3.88) 0.96 [ 4.37]( 2.17)
512 1.00 [ -0.00]( 1.80) 1.00 [ -0.37]( 1.43)
768 1.00 [ -0.00]( 0.92) 1.00 [ -0.00]( 0.00)
1024 1.00 [ -0.00]( 0.00) 1.00 [ -0.00]( 2.64)


==================================================================
Test : new-schbench-request-latency
Units : Normalized 99th percentile latency in us
Interpretation: Lower is better
Statistic : Median
==================================================================
#workers: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1 1.00 [ -0.00]( 0.27) 1.00 [ -0.00]( 0.00)
2 1.00 [ -0.00]( 0.00) 1.00 [ -0.26]( 0.00)
4 1.00 [ -0.00]( 0.14) 1.00 [ -0.26]( 0.00)
8 1.00 [ -0.00]( 0.00) 1.00 [ -0.26]( 0.00)
16 1.00 [ -0.00]( 0.14) 1.00 [ -0.26]( 0.00)
32 1.00 [ -0.00]( 0.27) 1.01 [ -0.53]( 0.49)
64 1.00 [ -0.00]( 0.14) 1.01 [ -0.53](30.11)
128 1.00 [ -0.00]( 2.99) 1.04 [ -4.41]( 3.96)
256 1.00 [ -0.00]( 0.52) 0.99 [ 1.15]( 0.43)
512 1.00 [ -0.00]( 2.81) 1.01 [ -1.22]( 2.69)
768 1.00 [ -0.00]( 0.46) 0.97 [ 3.27]( 0.46)
1024 1.00 [ -0.00]( 0.14) 1.00 [ -0.35]( 0.29)


I reran hackbench just to make sure the regression was a blip and as
expected there isn't any regression on the rerun:

==================================================================
Test : hackbench-rerun
Units : Normalized time in seconds
Interpretation: Lower is better
Statistic : AMean
==================================================================
Case: upstream:cee73b1e840c[pct imp](CV) queue:sched/core[pct imp](CV)
1-groups 1.00 [ -0.00](13.66) 0.93 [ 6.88]( 3.91)
2-groups 1.00 [ -0.00]( 9.40) 0.87 [ 12.95](14.81)
4-groups 1.00 [ -0.00]( 3.58) 0.98 [ 2.03]( 3.67)
8-groups 1.00 [ -0.00]( 3.52) 1.01 [ -1.28]( 2.73)
16-groups 1.00 [ -0.00]( 7.05) 0.99 [ 1.11]( 3.96)

--
Thanks and Regards,
Prateek