mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ANDROID: sched/fair: unlink misfit from cpu overutilized
Partially applies patch from Vincent Guittot
e5ed0550c0: ("sched/fair: unlink misfit task from cpu overutilized")
The full patch improves the search logic under thermal pressure, but
it's a bit intrusive to fully backport. We are interested in the part
that unlinks misfit from overutilized only.
Bug: 283975667
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: I2ae21499b846d13d3889f8cacdb70652817b066f
This commit is contained in:
@@ -9963,6 +9963,16 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
|
||||
*/
|
||||
update_sd_lb_stats(env, &sds);
|
||||
|
||||
/* There is no busy sibling group to pull tasks from */
|
||||
if (!sds.busiest)
|
||||
goto out_balanced;
|
||||
|
||||
busiest = &sds.busiest_stat;
|
||||
|
||||
/* Misfit tasks should be dealt with regardless of the avg load */
|
||||
if (busiest->group_type == group_misfit_task)
|
||||
goto force_balance;
|
||||
|
||||
if (sched_energy_enabled()) {
|
||||
struct root_domain *rd = env->dst_rq->rd;
|
||||
int out_balance = 1;
|
||||
@@ -9974,17 +9984,6 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
|
||||
goto out_balanced;
|
||||
}
|
||||
|
||||
local = &sds.local_stat;
|
||||
busiest = &sds.busiest_stat;
|
||||
|
||||
/* There is no busy sibling group to pull tasks from */
|
||||
if (!sds.busiest)
|
||||
goto out_balanced;
|
||||
|
||||
/* Misfit tasks should be dealt with regardless of the avg load */
|
||||
if (busiest->group_type == group_misfit_task)
|
||||
goto force_balance;
|
||||
|
||||
/* ASYM feature bypasses nice load balance check */
|
||||
if (busiest->group_type == group_asym_packing)
|
||||
goto force_balance;
|
||||
@@ -9997,6 +9996,8 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
|
||||
if (busiest->group_type == group_imbalanced)
|
||||
goto force_balance;
|
||||
|
||||
local = &sds.local_stat;
|
||||
|
||||
/*
|
||||
* If the local group is busier than the selected busiest group
|
||||
* don't try and pull any tasks.
|
||||
|
||||
Reference in New Issue
Block a user