[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1582183784-13502-1-git-send-email-qiwuchen55@gmail.com>
Date: Thu, 20 Feb 2020 15:29:44 +0800
From: qiwuchen55@...il.com
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de
Cc: linux-kernel@...r.kernel.org, chenqiwu <chenqiwu@...omi.com>
Subject: [PATCH] sched/fair: add !se->on_rq check before dequeue entity
From: chenqiwu <chenqiwu@...omi.com>
We igonre checking for !se->on_rq condition before dequeue one
entity from cfs rq. It must be required in case the entity has
been dequeued.
Signed-off-by: chenqiwu <chenqiwu@...omi.com>
---
kernel/sched/fair.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3c8a379..945dcaf 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5341,6 +5341,8 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
bool was_sched_idle = sched_idle_rq(rq);
for_each_sched_entity(se) {
+ if (!se->on_rq)
+ break;
cfs_rq = cfs_rq_of(se);
dequeue_entity(cfs_rq, se, flags);
--
1.9.1
Powered by blists - more mailing lists