All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: consider sched-idle CPU when selecting idle core
@ 2020-07-23 23:38 Jiang Biao
  2020-07-24  7:23 ` Vincent Guittot
  0 siblings, 1 reply; 7+ messages in thread
From: Jiang Biao @ 2020-07-23 23:38 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, linux-kernel, Jiang Biao

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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-24 12:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 23:38 [PATCH] sched/fair: consider sched-idle CPU when selecting idle core Jiang Biao
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.