From nobody Mon Jun 8 07:24:28 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99BAB481232; Thu, 4 Jun 2026 18:45:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780598756; cv=none; b=lp0DAbN4dyr9HsjgkNoW2kKoXdOygP1kcDPpd2+YxTdw66Bfzpq+MSFHxyfRhSbKYFZU9QkuFRoCoQ9i3ZUXBykJ5qbFgBDCOKvTF9gP467RQYtFo6Wu5nnd2zdJKwSNJ/SckZfMI1Y81SKKFyjyC/MzC3XK327doOuFOoGNU5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780598756; c=relaxed/simple; bh=1LcgWtmiTVyl69I14m/N27gwpdGkv2o6IlnQ2l2DRfs=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=SJp/6R9jZBEX5L5419WmIGknfaX4bXOl0jsbMP61dgSuxSLCNzzqfGFMYrDW7zTVd8oht2rCQ4sWQ4DCwffJY1zyF4IDCveO7qVPxxJQs00wUj9lBaYZc9MHqA3KwNq+UgfqO8NbZ03pTvIH5Kae2tge99DMhrMNF3q6mqk0s5Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zj0+Lb9g; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MlWhBd6e; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zj0+Lb9g"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MlWhBd6e" Date: Thu, 04 Jun 2026 18:45:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1780598752; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zll/ZwT9SQINqteqNiIAj0jE4cR6OytpXHUTEI/gyH4=; b=zj0+Lb9gyGvhdNWmJIEh4N/K/nqUoAdiNGoyFAeaGui0b7qBo77R7F9tGGVzWS+HBwh4Ay Ysi6vRm17ICvB4fymvP4hoWytWY2K3E9bR6Kt/yKZ9WpUxpbPQJWDxUtJCaXM1JvepF4g5 /VQtg6g+FSWC1pd9jn1Gsh2vc5c2ewvCsFWx11M59ovpIUTo2kWpTZOc2dWtsbqicK10HE A2okjsgxjCn1famPPApW77OL6PYniK22i3MW3z+KmGPs789+aAdRjYs6Iz3BBvgmnQQj2G 2n9hvsOF7rWtqvYRi/9YhvFLX7BNLKjJFFzzGAeZZC1QsDGLISaAkCWh1xk0Gw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1780598752; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zll/ZwT9SQINqteqNiIAj0jE4cR6OytpXHUTEI/gyH4=; b=MlWhBd6e6BeCQXkymFDmsEm1LM5muSxqKr5ANggMdRlFNa7gjvNubN7Ug/gnh4ctycQKhH IugFFB4fJdkaPIBw== From: "tip-bot2 for John Stultz" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched: deadline: Add some helper variables to cleanup deadline logic Cc: Peter Zijlstra , John Stultz , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260512025635.2840817-3-jstultz@google.com> References: <20260512025635.2840817-3-jstultz@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178059875104.710.10048741210314979226.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/core branch of tip: Commit-ID: 96a6988fb595ab1d77f60b33ea392b2e15b68605 Gitweb: https://git.kernel.org/tip/96a6988fb595ab1d77f60b33ea392b2e1= 5b68605 Author: John Stultz AuthorDate: Tue, 12 May 2026 02:56:12=20 Committer: Peter Zijlstra CommitterDate: Tue, 02 Jun 2026 12:26:06 +02:00 sched: deadline: Add some helper variables to cleanup deadline logic As part of an improvement to handling pushable deadline tasks, Peter suggested this cleanup[1], to use helper values for dl_entity and dl_rq in the enqueue_task_dl() and put_prev_task_dl() functions. There should be no functional change from this patch. To make sure this cleanup change doesn't obscure later logic changes, I've split it into its own patch. [1]: https://lore.kernel.org/lkml/20260304095123.GP606826@noisy.programming= .kicks-ass.net/ Suggested-by: Peter Zijlstra Signed-off-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260512025635.2840817-3-jstultz@google.com --- kernel/sched/deadline.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 6ef5a80..0b7ac4c 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -2484,7 +2484,10 @@ static void dequeue_dl_entity(struct sched_dl_entity= *dl_se, int flags) =20 static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flag= s) { - if (is_dl_boosted(&p->dl)) { + struct sched_dl_entity *dl_se =3D &p->dl; + struct dl_rq *dl_rq =3D &rq->dl; + + if (is_dl_boosted(dl_se)) { /* * Because of delays in the detection of the overrun of a * thread's runtime, it might be the case that a thread @@ -2497,14 +2500,14 @@ static void enqueue_task_dl(struct rq *rq, struct t= ask_struct *p, int flags) * * In this case, the boost overrides the throttle. */ - if (p->dl.dl_throttled) { + if (dl_se->dl_throttled) { /* * The replenish timer needs to be canceled. No * problem if it fires concurrently: boosted threads * are ignored in dl_task_timer(). */ - cancel_replenish_timer(&p->dl); - p->dl.dl_throttled =3D 0; + cancel_replenish_timer(dl_se); + dl_se->dl_throttled =3D 0; } } else if (!dl_prio(p->normal_prio)) { /* @@ -2516,7 +2519,7 @@ static void enqueue_task_dl(struct rq *rq, struct tas= k_struct *p, int flags) * being boosted again with no means to replenish the runtime and clear * the throttle. */ - p->dl.dl_throttled =3D 0; + dl_se->dl_throttled =3D 0; if (!(flags & ENQUEUE_REPLENISH)) printk_deferred_once("sched: DL de-boosted task PID %d: REPLENISH flag = missing\n", task_pid_nr(p)); @@ -2525,20 +2528,20 @@ static void enqueue_task_dl(struct rq *rq, struct t= ask_struct *p, int flags) } =20 check_schedstat_required(); - update_stats_wait_start_dl(dl_rq_of_se(&p->dl), &p->dl); + update_stats_wait_start_dl(dl_rq, dl_se); =20 if (p->on_rq =3D=3D TASK_ON_RQ_MIGRATING) flags |=3D ENQUEUE_MIGRATING; =20 - enqueue_dl_entity(&p->dl, flags); + enqueue_dl_entity(dl_se, flags); =20 - if (dl_server(&p->dl)) + if (dl_server(dl_se)) return; =20 if (task_is_blocked(p)) return; =20 - if (!task_current(rq, p) && !p->dl.dl_throttled && p->nr_cpus_allowed > 1) + if (!task_current(rq, p) && !dl_se->dl_throttled && p->nr_cpus_allowed > = 1) enqueue_pushable_dl_task(rq, p); } =20 @@ -2835,7 +2838,7 @@ static void put_prev_task_dl(struct rq *rq, struct ta= sk_struct *p, struct task_s struct sched_dl_entity *dl_se =3D &p->dl; struct dl_rq *dl_rq =3D &rq->dl; =20 - if (on_dl_rq(&p->dl)) + if (on_dl_rq(dl_se)) update_stats_wait_start_dl(dl_rq, dl_se); =20 update_curr_dl(rq); @@ -2845,7 +2848,7 @@ static void put_prev_task_dl(struct rq *rq, struct ta= sk_struct *p, struct task_s if (task_is_blocked(p)) return; =20 - if (on_dl_rq(&p->dl) && p->nr_cpus_allowed > 1) + if (on_dl_rq(dl_se) && p->nr_cpus_allowed > 1) enqueue_pushable_dl_task(rq, p); } =20