From: Jiang Biao <humjb_1983@163.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org
Cc: dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de,
linux-kernel@vger.kernel.org, Jiang Biao <benbjiang@tencent.com>
Subject: [PATCH] sched/fair: consider sched-idle CPU when selecting idle core
Date: Fri, 24 Jul 2020 07:38:53 +0800 [thread overview]
Message-ID: <20200723233853.48815-1-humjb_1983@163.com> (raw)
From: Jiang Biao <benbjiang@tencent.com>
Sched-idle CPU has been considered in select_idle_cpu and
select_idle_smt, it also needs to be considered in select_idle_core to
be consistent and keep the same *idle* policy.
Signed-off-by: Jiang Biao <benbjiang@tencent.com>
---
kernel/sched/fair.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 04fa8dbcfa4d..f430a9820d08 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6014,7 +6014,7 @@ void __update_idle_core(struct rq *rq)
if (cpu == core)
continue;
- if (!available_idle_cpu(cpu))
+ if (!available_idle_cpu(cpu) && !sched_idle_cpu(cpu))
goto unlock;
}
@@ -6045,7 +6045,7 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int
bool idle = true;
for_each_cpu(cpu, cpu_smt_mask(core)) {
- if (!available_idle_cpu(cpu)) {
+ if (!available_idle_cpu(cpu) && !sched_idle_cpu(cpu)) {
idle = false;
break;
}
--
2.21.0
next reply other threads:[~2020-07-24 0:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 23:38 Jiang Biao [this message]
2020-07-24 7:23 ` Vincent Guittot
2020-07-24 8:12 ` Jiang Biao
2020-07-24 10:33 ` Vincent Guittot
2020-07-24 11:53 ` Jiang Biao
2020-07-24 12:36 ` Ingo Molnar
2020-07-24 12:40 ` Jiang Biao
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=20200723233853.48815-1-humjb_1983@163.com \
--to=humjb_1983@163.com \
--cc=benbjiang@tencent.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.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®