]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched/proxy: Remove superfluous clear_task_blocked_in()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 26 May 2026 09:22:30 +0000 (11:22 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 2 Jun 2026 10:26:09 +0000 (12:26 +0200)
Per the discussion here:

  https://lore.kernel.org/all/20260403112810.GG3738786@noisy.programming.kicks-ass.net/

The reason for this condition is that the signal condition in
try_to_block_task() would set_task_blocked_in_waking(). However, it no longer
does that, in fact, that path does clear_task_blocked_on().

Further, per the discussions here:

  https://lore.kernel.org/r/dc61cf77-e541-441d-a708-c40e19aa0db2%40amd.com
  https://lore.kernel.org/r//9dd1d24d-45d3-4ee2-8e67-8305b34bfb6d%40amd.com

there are a few other edge cases that needed this. But they're all
variants of PROXY_WAKING leaking out. And since PROXY_WAKING is now
gone, this is no longer needed either.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: John Stultz <jstultz@google.com>
Link: https://patch.msgid.link/20260526113322.120970670%40infradead.org
kernel/sched/core.c

index cec2c164fab17bf0fa524a5cc0e584324095027e..d5795188d5b6191029b8ceec8a11948d4110cc42 100644 (file)
@@ -7142,9 +7142,6 @@ pick_again:
        if (sched_proxy_exec()) {
                struct task_struct *prev_donor = rq->donor;
 
-               if (!prev_state && prev->blocked_on)
-                       clear_task_blocked_on(prev, NULL);
-
                rq_set_donor(rq, next);
                next->blocked_donor = NULL;
                if (unlikely(next->is_blocked)) {