ANDROID: fair: Bring back the find_busiest_group vh

Because the commit: 82cf921432 (sched/balancing: Rename find_busiest_group() =>
sched_balance_find_src_group()) and commit: 902e786c4a ("sched/fair: Combine EAS
check with root_domain::overutilized access"), the find_busiest_group rvh was delted,
so bring it back again.

Bug: 376197366

Change-Id: Ib52e452ec27830c8a3ecf2686ce083ad02c0a239
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
This commit is contained in:
Xuewen Yan
2024-10-29 18:50:27 +08:00
committed by Treehugger Robot
parent cf4f05ceed
commit 2bd049998a
+3 -1
View File
@@ -11349,6 +11349,7 @@ static struct sched_group *sched_balance_find_src_group(struct lb_env *env)
{
struct sg_lb_stats *local, *busiest;
struct sd_lb_stats sds;
int out_balance = 1;
init_sd_lb_stats(&sds);
@@ -11368,8 +11369,9 @@ static struct sched_group *sched_balance_find_src_group(struct lb_env *env)
if (busiest->group_type == group_misfit_task)
goto force_balance;
trace_android_rvh_find_busiest_group(sds.busiest, env->dst_rq, &out_balance);
if (!is_rd_overutilized(env->dst_rq->rd) &&
rcu_dereference(env->dst_rq->rd->pd))
rcu_dereference(env->dst_rq->rd->pd) && out_balance)
goto out_balanced;
/* ASYM feature bypasses nice load balance check */