summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorChristian Loehle <christian.loehle@arm.com>2026-10-16 08:33:40 +0100
committerPeter Zijlstra <peterz@infradead.org>2026-10-16 09:49:04 +0200
commitb99b7f60c5b473d374c68b53753153b4aa9e0702 (patch)
tree60e65a9c8eeab5570cbb5d26aa69f048a6016b41 /tools/perf/scripts/python
parent0a94d0ea8d8b464ff597ae2f534dd60b64b4da0f (diff)
downloadlinux-b99b7f60c5b473d374c68b53753153b4aa9e0702.tar.gz
linux-b99b7f60c5b473d374c68b53753153b4aa9e0702.zip
sched: Replace nr_iowait_cpu() with a bool accessor
The menu governor was the last consumer of the per-CPU I/O-wait count that needed its magnitude, apart from nr_iowait() summing it globally. Commit 38f83090f515 ("cpuidle: menu: Remove iowait influence") removed that use. All remaining per-CPU consumers only test for zero/nonzero. Replace nr_iowait_cpu() with bool cpu_has_iowait() and update the generic and s390 idle accounting callers. Have nr_iowait() read the counters directly so that the global total and existing accounting are preserved. Replace the stale menu comment with a description of the predicate. Also convert the remaining open-coded idle accounting checks to use the predicate, as suggested by Prateek. The conversion was done with coccinelle: @ predicate depends on patch @ expression cpu; @@ - nr_iowait_cpu(cpu) > 0 + cpu_has_iowait(cpu) @ callers depends on patch @ expression cpu; @@ - nr_iowait_cpu(cpu) + cpu_has_iowait(cpu) Signed-off-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kayra Cizmeci <kayracizmeci@gmail.com> Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com> Tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Link: https://patch.msgid.link/20261016073341.575472-1-christian.loehle@arm.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions