From 02ee287af9e317ef70cc41ca6fa0d7bfc376c3d0 Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Mon, 20 Jan 2020 16:49:26 +0530 Subject: [PATCH] sched/fair: consider uclamp boost while deciding the start_cpu The find_best_target() looks for the higher capacity CPU when the task is boosted. However the current code does not consider the boost while deciding the start_cpu. This may result in unnecessary traversal of the lower capacity CPU group in find_best_target(). Change-Id: I8153482e15d2c9ea8971415edb9dbd54e10e11d0 Signed-off-by: Pavankumar Kondeti --- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 556c07b58dcc..14789ddcf72b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6388,8 +6388,9 @@ static int get_start_cpu(struct task_struct *p) struct root_domain *rd = cpu_rq(smp_processor_id())->rd; int start_cpu = rd->min_cap_orig_cpu; int task_boost = per_task_boost(p); - bool boosted = task_boost_policy(p) == SCHED_BOOST_ON_BIG || - task_boost == TASK_BOOST_ON_MID; + bool boosted = uclamp_boosted(p) || + task_boost_policy(p) == SCHED_BOOST_ON_BIG || + task_boost == TASK_BOOST_ON_MID; bool task_skip_min = task_skip_min_cpu(p); /*