Commit a741b824 authored by Youssef Esmat's avatar Youssef Esmat Committed by Peter Zijlstra
Browse files

sched/core: Clear prev->dl_server in CFS pick fast path



In case the previous pick was a DL server pick, ->dl_server might be
set. Clear it in the fast path as well.

Fixes: 63ba8422 ("sched/deadline: Introduce deadline servers")
Signed-off-by: default avatarYoussef Esmat <youssefesmat@google.com>
Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarJuri Lelli <juri.lelli@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/7f7381ccba09efcb4a1c1ff808ed58385eccc222.1716811044.git.bristot@kernel.org
parent c2459100
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5839,6 +5839,13 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
			p = pick_next_task_idle(rq);
		}

		/*
		 * This is a normal CFS pick, but the previous could be a DL pick.
		 * Clear it as previous is no longer picked.
		 */
		if (prev->dl_server)
			prev->dl_server = NULL;

		/*
		 * This is the fast path; it cannot be a DL server pick;
		 * therefore even if @p == @prev, ->dl_server must be NULL.