[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240130131708.429425-6-alexs@kernel.org>
Date: Tue, 30 Jan 2024 21:17:08 +0800
From: alexs@...nel.org
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>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org,
ricardo.neri-calderon@...ux.intel.com,
sshegde@...ux.ibm.com
Cc: Alex Shi <alexs@...nel.org>
Subject: [PATCH v2 6/6 RFT] sched/fair: change sched asym checking condition
From: Alex Shi <alexs@...nel.org>
Asym only used on SMT sd, or core sd with ITMT and core idled.
!sched_smt_active isn't necessary.
Signed-off-by: Alex Shi <alexs@...nel.org>
To: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: linux-kernel@...r.kernel.org
To: Valentin Schneider <vschneid@...hat.com>
To: Daniel Bristot de Oliveira <bristot@...hat.com>
To: Ben Segall <bsegall@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
To: Dietmar Eggemann <dietmar.eggemann@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>
To: Juri Lelli <juri.lelli@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
To: Ingo Molnar <mingo@...hat.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 6680cb39c787..0b7530b93429 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9744,8 +9744,8 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
if (!(sd->flags & SD_ASYM_PACKING))
return false;
- return (!sched_smt_active()) ||
- (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu);
+ return (sd->flags & SD_SHARE_CPUCAPACITY) ||
+ (is_core_idle(cpu) && test_bit(cpu_core_flags(), (void *)&sd->flags));
}
static inline bool sched_asym(struct sched_domain *sd, int dst_cpu, int src_cpu)
--
2.43.0
Powered by blists - more mailing lists