]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/fair: Avoid rq->lock bouncing in sched_balance_newidle()
authorPeter Zijlstra <peterz@infradead.org>
Wed, 12 Nov 2025 15:08:23 +0000 (16:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 14 Dec 2025 07:25:02 +0000 (08:25 +0100)
commit45e09225085f70b856b7b9f26a18ea767a7e1563
tree4ee995ac737ae4ad00388fa86ab62fd88b16e053
parent089d84203ad42bc8fd6dbf41683e162ac6e848cd
sched/fair: Avoid rq->lock bouncing in sched_balance_newidle()

While poking at this code recently I noted we do a pointless
unlock+lock cycle in sched_balance_newidle(). We drop the rq->lock (so
we can balance) but then instantly grab the same rq->lock again in
sched_balance_update_blocked_averages().

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20251127154725.532469061@infradead.org
kernel/sched/fair.c