[<prev] [next>] [day] [month] [year] [list]
Message-ID: <172595576315.2215.18439028128450913806.tip-bot2@tip-bot2>
Date: Tue, 10 Sep 2024 08:09:23 -0000
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched: Fix sched_delayed vs sched_core
The following commit has been merged into the sched/core branch of tip:
Commit-ID: c662e2b1e8cfc3b6329704dab06051f8c3ec2993
Gitweb: https://git.kernel.org/tip/c662e2b1e8cfc3b6329704dab06051f8c3ec2993
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Thu, 05 Sep 2024 17:02:24 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 10 Sep 2024 09:51:15 +02:00
sched: Fix sched_delayed vs sched_core
Completely analogous to commit dfa0a574cbc4 ("sched/uclamg: Handle
delayed dequeue"), avoid double dequeue for the sched_core entries.
Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue")
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
kernel/sched/core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2922fac..b4c5d83 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -259,6 +259,9 @@ static inline int rb_sched_core_cmp(const void *key, const struct rb_node *node)
void sched_core_enqueue(struct rq *rq, struct task_struct *p)
{
+ if (p->se.sched_delayed)
+ return;
+
rq->core->core_task_seq++;
if (!p->core_cookie)
@@ -269,6 +272,9 @@ void sched_core_enqueue(struct rq *rq, struct task_struct *p)
void sched_core_dequeue(struct rq *rq, struct task_struct *p, int flags)
{
+ if (p->se.sched_delayed)
+ return;
+
rq->core->core_task_seq++;
if (sched_core_enqueued(p)) {
Powered by blists - more mailing lists