[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210908203946.1261798-1-daniel.m.jordan@oracle.com>
Date: Wed, 8 Sep 2021 16:39:46 -0400
From: Daniel Jordan <daniel.m.jordan@...cle.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>
Cc: Josh Don <joshdon@...gle.com>, linux-kernel@...r.kernel.org,
Daniel Jordan <daniel.m.jordan@...cle.com>
Subject: [PATCH] sched/fair: Fix se_is_idle() for !FAIR_GROUP_SCHED
se_is_idle() unconditionally returns 0 for !FAIR_GROUP_SCHED.
Check whether the task is SCHED_IDLE instead so buddies aren't set for
such tasks, as was the behavior before 304000390f88.
Fixes: 304000390f88 ("sched: Cgroup SCHED_IDLE support")
Signed-off-by: Daniel Jordan <daniel.m.jordan@...cle.com>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ff69f245b939..8b22665bc18e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -497,7 +497,7 @@ static int cfs_rq_is_idle(struct cfs_rq *cfs_rq)
static int se_is_idle(struct sched_entity *se)
{
- return 0;
+ return task_has_idle_policy(task_of(se));
}
#endif /* CONFIG_FAIR_GROUP_SCHED */
base-commit: ac08b1c68d1b1ed3cebb218fc3ea2c07484eb07d
--
2.32.0
Powered by blists - more mailing lists