summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorAndrea Righi <arighi@nvidia.com>2026-05-09 20:07:25 +0200
committerPeter Zijlstra <peterz@infradead.org>2026-05-19 12:17:37 +0200
commitc9d93a73ce871ca32caf9308562501290b64b955 (patch)
treecece9587f57d947ded0512749575975ab92a4f91 /scripts/basic
parentacbdbab75ff4b1b87ab3c3d2b6ca86948f472189 (diff)
sched/fair: Drop redundant RCU read lock in NOHZ kick path
nohz_balancer_kick() is reached from sched_balance_trigger(), which is called from sched_tick(). sched_tick() runs with IRQs disabled, so the additional rcu_read_lock/unlock() used around sched_domain accesses in this path is redundant. Rely on the existing IRQ-disabled context (and the rcu_dereference_all() checking) instead. The same applies to set_cpu_sd_state_idle(), called from the idle entry path with IRQs disabled, and to set_cpu_sd_state_busy(), reachable via nohz_balance_exit_idle() from two contexts: nohz_balancer_kick() (IRQs disabled, as above) and sched_cpu_deactivate() (the CPUHP_AP_ACTIVE teardown, which runs under cpus_write_lock(), so it cannot race with sched-domain rebuilds). In both cases the rcu_dereference_all() validation is sufficient. No functional change intended. Suggested-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org> Link: https://patch.msgid.link/20260509180955.1840064-2-arighi@nvidia.com
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions