Re: [RFC 0/3] powerpc64: Preempt count optimizations
From: Jirka Hladky
Date: Fri Nov 20 2026 - 13:21:51 EST
Hi Shrikanth,
Thanks for the RFC and for the pointer. We ran it on our POWER10 box.
Short summary: functionally clean, but we could not reproduce the
performance gains, and the stress-ng kill regression from the
ppc64le dynamic-preemption discussion [1] does not improve.
## Setup
Same-tree A/B on ibm-p10-01-lp13 (IBM 9080-HEX, POWER10, pHyp LPAR, 1 core
SMT-8, 64 GiB, ppc64le):
- baseline: v7.4-rc3
- patched: v7.4-rc3 + this series (git am, applies cleanly)
- config: seeded from our ELN ppc64le config:
CONFIG_PREEMPT_DYNAMIC=y,
CONFIG_PREEMPT_RCU=y; dynamic preempt default resolves to "lazy" on boot
- SELinux enforcing, tuned virtual-guest, stress-ng 0.21.03
- interleaved rounds, full reboots between all measurements
(n=27/kernel for stress-ng, n=20/config for hackbench)
## Functional: clean
Both kernels boot and run without any dmesg findings. No
scheduling-while-atomic, preempt-count imbalance, lockdep, RCU or NMI
splats. The NMI-folding (HAS_SEPARATE_PREEMPT_RESCHED_BITS) and PACA
preempt-count paths work under load (stress-ng, hackbench, perf).
## stress-ng --kill 1 -t 23 (the RHEL-216657 worst case)
baseline 58,722 bogo-ops/s
patched 57,378 bogo-ops/s (-2.3%, 95% CI [-5.0%, +0.4%], n.s.)
No recovery of the kill regression. (Noise floor on this LPAR is CV ~7-8%,
single-threaded on a shared frame. Effects below ~4% are not resolvable
here.)
## hackbench (20 groups, 1000 loops)
baseline patched delta
process, socket 3.601s 3.653s +1.4% (p=0.09)
thread, socket 3.860s 3.895s +0.9% (p=0.014)
process, pipe 1.619s 1.608s -0.7% (p=0.60)
thread, pipe 1.778s 1.771s -0.4% (p=0.40)
We could not reproduce the 2-3% gains from your cover letter; our socket
configs point the other way slightly.
## perf profile observation
Paired perf-record runs of the kill stressor show __rcu_read_lock +
__rcu_read_unlock at 5.5% of cycles on baseline vs 4.5% on the patched
kernel, so the RCU read-side component did get cheaper, but avc_lookup
(22-24%) dominates this path and total throughput does not move. That
matches our earlier root-cause analysis of the dynamic-preemption
regression [1]: on this path the cost is dominated by the weak-ordering
barriers rather than by the preempt_count address computation this series
optimizes.
## preempt=full follow-up
Since our config defaults to "Dynamic Preempt: lazy", we also reran the full
matrix with preempt=full on both kernels (same tree, same methodology,
n=15/kernel kill, n=10/config hackbench):
stress-ng --kill: baseline 53,995 vs patched 53,901 bogo-ops/s
(-0.2%, flat)
hackbench: all four configs within +/-0.8%, none significant
(process/thread x socket/pipe)
So under full preemption as well, the series shows neither the gains from
the cover letter nor any regression on our box. For completeness: the mode
itself matters more than the patch on this workload. Kill drops from
~58.7k (lazy) to ~54.0k (full) bogo-ops/s on both kernels alike.
Thanks again! I'm happy to share raw data or rerun with different parameters.
[1] https://lore.kernel.org/all/20250210184334.567383-1-sshegde@xxxxxxxxxxxxx/
--
Jirka Hladky
Red Hat