mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Joel Fernandes (Google)" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	stable@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/core: Add clearing of ->dl_server in put_prev_task_balance()
Date: Mon, 29 Jul 2024 10:34:05 -0000	[thread overview]
Message-ID: <172224924542.2215.183295537428039900.tip-bot2@tip-bot2> (raw)
In-Reply-To: <d184d554434bedbad0581cb34656582d78655150.1716811044.git.bristot@kernel.org>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     c245910049d04fbfa85bb2f5acd591c24e9907c7
Gitweb:        https://git.kernel.org/tip/c245910049d04fbfa85bb2f5acd591c24e9907c7
Author:        Joel Fernandes (Google) <joel@joelfernandes.org>
AuthorDate:    Mon, 27 May 2024 14:06:48 +02:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 29 Jul 2024 12:22:35 +02:00

sched/core: Add clearing of ->dl_server in put_prev_task_balance()

Paths using put_prev_task_balance() need to do a pick shortly
after. Make sure they also clear the ->dl_server on prev as a
part of that.

Fixes: 63ba8422f876 ("sched/deadline: Introduce deadline servers")
Signed-off-by: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Juri Lelli <juri.lelli@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/d184d554434bedbad0581cb34656582d78655150.1716811044.git.bristot@kernel.org
---
 kernel/sched/core.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 0a71050..e61da3b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5801,6 +5801,14 @@ static void put_prev_task_balance(struct rq *rq, struct task_struct *prev,
 #endif
 
 	put_prev_task(rq, prev);
+
+	/*
+	 * We've updated @prev and no longer need the server link, clear it.
+	 * Must be done before ->pick_next_task() because that can (re)set
+	 * ->dl_server.
+	 */
+	if (prev->dl_server)
+		prev->dl_server = NULL;
 }
 
 /*
@@ -5844,14 +5852,6 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 restart:
 	put_prev_task_balance(rq, prev, rf);
 
-	/*
-	 * We've updated @prev and no longer need the server link, clear it.
-	 * Must be done before ->pick_next_task() because that can (re)set
-	 * ->dl_server.
-	 */
-	if (prev->dl_server)
-		prev->dl_server = NULL;
-
 	for_each_class(class) {
 		p = class->pick_next_task(rq);
 		if (p)

  reply	other threads:[~2024-07-29 10:34 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 12:06 [PATCH V7 0/9] SCHED_DEADLINE server infrastructure Daniel Bristot de Oliveira
2024-05-27 12:06 ` [PATCH V7 1/9] sched/deadline: Comment sched_dl_entity::dl_server variable Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Daniel Bristot de Oliveira
2024-05-27 12:06 ` [PATCH V7 2/9] sched/core: Add clearing of ->dl_server in put_prev_task_balance() Daniel Bristot de Oliveira
2024-07-29 10:34   ` tip-bot2 for Joel Fernandes (Google) [this message]
2024-05-27 12:06 ` [PATCH V7 3/9] sched/core: Clear prev->dl_server in CFS pick fast path Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Youssef Esmat
2024-05-27 12:06 ` [PATCH V7 4/9] sched/fair: Add trivial fair server Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2024-05-27 12:06 ` [PATCH V7 5/9] sched/deadline: Deferrable dl server Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Daniel Bristot de Oliveira
2024-05-27 12:06 ` [PATCH V7 6/9] sched/fair: Fair server interface Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Daniel Bristot de Oliveira
2024-05-27 12:06 ` [PATCH V7 7/9] sched/core: Fix priority checking for DL server picks Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Joel Fernandes (Google)
2024-05-27 12:06 ` [PATCH V7 8/9] sched/core: Fix picking of tasks for core scheduling with DL server Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Joel Fernandes (Google)
2024-05-27 12:06 ` [PATCH V7 9/9] sched/rt: Remove default bandwidth control Daniel Bristot de Oliveira
2024-07-29 10:34   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2024-11-27 10:55   ` [PATCH V7 9/9] " Michal Koutný
2024-11-27 15:35     ` Juri Lelli
2024-11-29 10:02       ` Michal Koutný
2024-11-29 14:44         ` Juri Lelli
2024-11-29 20:21           ` Michal Koutný
2024-12-02  9:39             ` Juri Lelli
2024-06-21 13:37 ` [PATCH V7 0/9] SCHED_DEADLINE server infrastructure Juri Lelli
2024-06-21 13:43   ` Daniel Bristot de Oliveira
2024-06-21 13:50     ` Juri Lelli
2024-06-21 14:41 ` Vineeth Remanan Pillai
2024-06-21 14:59   ` Daniel Bristot de Oliveira
2024-06-21 15:09     ` Vineeth Remanan Pillai
2024-06-21 15:16       ` Daniel Bristot de Oliveira
2024-07-29 10:32   ` Peter Zijlstra
2024-07-29 20:42     ` Vineeth Remanan Pillai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172224924542.2215.183295537428039900.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bristot@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®