Revert "sched/fair: Don't allow boosted tasks to be migrated to small cores"

This reverts commit d5afaaf78fc6335662448dcc3202c0b6f5917000.

Change-Id: Ifca9223a0b308bd3abe6628f3b34335d26313a99
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
Richard Raya 2024-08-17 19:36:44 -03:00
parent 5d8ec03b95
commit 28d9baa9be

View File

@ -9349,7 +9349,6 @@ enum group_type {
#define LBF_ACTIVE_LB 0x10 #define LBF_ACTIVE_LB 0x10
#define LBF_IGNORE_BIG_TASKS 0x100 #define LBF_IGNORE_BIG_TASKS 0x100
#define LBF_IGNORE_PREFERRED_CLUSTER_TASKS 0x200 #define LBF_IGNORE_PREFERRED_CLUSTER_TASKS 0x200
#define LBF_IGNORE_STUNE_BOOSTED_TASKS 0x400
struct lb_env { struct lb_env {
struct sched_domain *sd; struct sched_domain *sd;
@ -9552,11 +9551,6 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
!task_fits_max(p, env->dst_cpu)) !task_fits_max(p, env->dst_cpu))
return 0; return 0;
/* Don't allow boosted tasks to be pulled to small cores */
if (env->flags & LBF_IGNORE_STUNE_BOOSTED_TASKS &&
(schedtune_task_boost(p) > 10))
return 0;
if (task_running(env->src_rq, p)) { if (task_running(env->src_rq, p)) {
schedstat_inc(p->se.statistics.nr_failed_migrations_running); schedstat_inc(p->se.statistics.nr_failed_migrations_running);
return 0; return 0;
@ -9682,9 +9676,6 @@ static int detach_tasks(struct lb_env *env)
if (cpu_capacity(env->dst_cpu) < cpu_capacity(env->src_cpu)) if (cpu_capacity(env->dst_cpu) < cpu_capacity(env->src_cpu))
env->flags |= LBF_IGNORE_BIG_TASKS; env->flags |= LBF_IGNORE_BIG_TASKS;
if (is_min_capacity_cpu(env->dst_cpu) && !is_min_capacity_cpu(env->src_cpu))
env->flags |= LBF_IGNORE_STUNE_BOOSTED_TASKS;
redo: redo:
while (!list_empty(tasks)) { while (!list_empty(tasks)) {
/* /*
@ -9773,12 +9764,10 @@ next:
} }
if (env->flags & (LBF_IGNORE_BIG_TASKS | if (env->flags & (LBF_IGNORE_BIG_TASKS |
LBF_IGNORE_PREFERRED_CLUSTER_TASKS | LBF_IGNORE_PREFERRED_CLUSTER_TASKS) && !detached) {
LBF_IGNORE_STUNE_BOOSTED_TASKS) && !detached) {
tasks = &env->src_rq->cfs_tasks; tasks = &env->src_rq->cfs_tasks;
env->flags &= ~(LBF_IGNORE_BIG_TASKS | env->flags &= ~(LBF_IGNORE_BIG_TASKS |
LBF_IGNORE_PREFERRED_CLUSTER_TASKS | LBF_IGNORE_PREFERRED_CLUSTER_TASKS);
LBF_IGNORE_STUNE_BOOSTED_TASKS);
env->loop = orig_loop; env->loop = orig_loop;
goto redo; goto redo;
} }