mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/deadline: Fix replenish_dl_new_period dl_server condition
@ 2024-11-27  6:37 Juri Lelli
  2024-12-02 11:14 ` [tip: sched/core] " tip-bot2 for Juri Lelli
  0 siblings, 1 reply; 2+ messages in thread
From: Juri Lelli @ 2024-11-27  6:37 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: linux-kernel, Juri Lelli, stable, Ingo Molnar, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider

The condition in replenish_dl_new_period() that checks if a reservation
(dl_server) is deferred and is not handling a starvation case is
obviously wrong.

Fix it.

Cc: stable@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Valentin Schneider <vschneid@redhat.com>
Fixes: a110a81c52a9 ("sched/deadline: Deferrable dl server")
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index d9d5a702f1a6..206691d35b7d 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -781,7 +781,7 @@ static inline void replenish_dl_new_period(struct sched_dl_entity *dl_se,
 	 * If it is a deferred reservation, and the server
 	 * is not handling an starvation case, defer it.
 	 */
-	if (dl_se->dl_defer & !dl_se->dl_defer_running) {
+	if (dl_se->dl_defer && !dl_se->dl_defer_running) {
 		dl_se->dl_throttled = 1;
 		dl_se->dl_defer_armed = 1;
 	}
-- 
2.47.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip: sched/core] sched/deadline: Fix replenish_dl_new_period dl_server condition
  2024-11-27  6:37 [PATCH] sched/deadline: Fix replenish_dl_new_period dl_server condition Juri Lelli
@ 2024-12-02 11:14 ` tip-bot2 for Juri Lelli
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Juri Lelli @ 2024-12-02 11:14 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Juri Lelli, Peter Zijlstra (Intel), stable, x86, linux-kernel

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

Commit-ID:     22368fe1f9bbf39db2b5b52859589883273e80ce
Gitweb:        https://git.kernel.org/tip/22368fe1f9bbf39db2b5b52859589883273e80ce
Author:        Juri Lelli <juri.lelli@redhat.com>
AuthorDate:    Wed, 27 Nov 2024 07:37:40 +01:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 02 Dec 2024 12:01:27 +01:00

sched/deadline: Fix replenish_dl_new_period dl_server condition

The condition in replenish_dl_new_period() that checks if a reservation
(dl_server) is deferred and is not handling a starvation case is
obviously wrong.

Fix it.

Fixes: a110a81c52a9 ("sched/deadline: Deferrable dl server")
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20241127063740.8278-1-juri.lelli@redhat.com
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index d9d5a70..206691d 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -781,7 +781,7 @@ static inline void replenish_dl_new_period(struct sched_dl_entity *dl_se,
 	 * If it is a deferred reservation, and the server
 	 * is not handling an starvation case, defer it.
 	 */
-	if (dl_se->dl_defer & !dl_se->dl_defer_running) {
+	if (dl_se->dl_defer && !dl_se->dl_defer_running) {
 		dl_se->dl_throttled = 1;
 		dl_se->dl_defer_armed = 1;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-02 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-27  6:37 [PATCH] sched/deadline: Fix replenish_dl_new_period dl_server condition Juri Lelli
2024-12-02 11:14 ` [tip: sched/core] " tip-bot2 for Juri Lelli

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®