summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShrikanth Hegde <sshegde@linux.ibm.com>2026-01-15 13:05:22 +0530
committerPeter Zijlstra <peterz@infradead.org>2026-01-15 22:41:26 +0100
commit6b67c8a72e56041f91f70ae5995bdb769761869a (patch)
tree81e640867dfbf9cd200eea05eca2cd486b084a3e /include
parent553255cc857c08d72658b57d01c04f76cde9a83a (diff)
sched/fair: Move checking for nohz cpus after time check
Current code does. - Read nohz.nr_cpus - Check if the time has passed to do NOHZ idle balance Instead do this. - Check if the time has passed to do NOHZ idle balance - Read nohz.nr_cpus This will skip the read most of the time in normal system usage. i.e when there are nohz.nr_cpus (system is not 100% busy). Note that when there are no idle CPUs(100% busy), even if the flag gets set to NOHZ_STATS_KICK | NOHZ_NEXT_KICK, find_new_ilb will fail and there will be no NOHZ idle balance. In such cases there will be a very narrow window where, kick_ilb will be called un-necessarily. However current functionality is still retained. Note: This patch doesn't solve any cacheline overheads. No improvement in performance apart from saving a few cycles of reading nohz.nr_cpus Reviewed-and-tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org> Link: https://patch.msgid.link/20260115073524.376643-2-sshegde@linux.ibm.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions