From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Josh Don <joshdon@google.com>,
linux-kernel@vger.kernel.org,
Daniel Jordan <daniel.m.jordan@oracle.com>
Subject: [PATCH] sched/fair: Fix se_is_idle() for !FAIR_GROUP_SCHED
Date: Wed, 8 Sep 2021 16:39:46 -0400 [thread overview]
Message-ID: <20210908203946.1261798-1-daniel.m.jordan@oracle.com> (raw)
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@oracle.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
next reply other threads:[~2021-09-08 20:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 20:39 Daniel Jordan [this message]
2021-09-08 20:56 ` Josh Don
2021-09-09 6:48 ` Vincent Guittot
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=20210908203946.1261798-1-daniel.m.jordan@oracle.com \
--to=daniel.m.jordan@oracle.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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®