[PATCH v2 3/6] sched/fair: cleanup sched_use_asym_prio
From: alexs
Date: Tue Jan 30 2024 - 08:14:48 EST
From: Alex Shi <alexs@xxxxxxxxxx>
And simplify the one line code. No function change.
Signed-off-by: Alex Shi <alexs@xxxxxxxxxx>
To: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
To: Valentin Schneider <vschneid@xxxxxxxxxx>
To: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/sched/fair.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8d70417f5125..ebd659af2d78 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9741,10 +9741,8 @@ group_type group_classify(unsigned int imbalance_pct,
*/
static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
{
- if (!sched_smt_active())
- return true;
-
- return sd->flags & SD_SHARE_CPUCAPACITY || is_core_idle(cpu);
+ return (!sched_smt_active()) ||
+ (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu);
}
/**
--
2.43.0