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.

The vh comes from the commit: a2ca8408de61("ANDROID: sched: add restrict vendor hook to modify load balance behavior"),
it allows vendors to modify load balance paths.

Bug: 376197366

Change-Id: Ib52e452ec27830c8a3ecf2686ce083ad02c0a239
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
(cherry picked from commit 2bd049998a)
This commit is contained in:
Xuewen Yan
2024-10-29 18:50:27 +08:00
committed by Treehugger Robot
parent 8faefbf00d
commit 7e37eb4f5f
+3 -1
View File
@@ -11336,6 +11336,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);
@@ -11355,8 +11356,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 */