Skip to content

Commit

Permalink
sched/fair: Don't remove important task migration logic from PELT
Browse files Browse the repository at this point in the history
This task migration logic is guarded by a WALT #ifdef even though it has
nothing specific to do with WALT. The result is that, with PELT, boosted
tasks can be migrated to the little cluster, causing visible stutters.

Move the WALT #ifdef so PELT can benefit from this logic as well.

Thanks to Zachariah Kennedy <[email protected]> and Danny Lin
<[email protected]> for discovering this issue and creating this fix.

Signed-off-by: Sultan Alsawaf <[email protected]>
  • Loading branch information
kerneltoast authored and subhajeetmuhuri committed Sep 26, 2022
1 parent 9895fe3 commit 2d4d85f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -9223,12 +9223,12 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
if (env->flags & LBF_IGNORE_PREFERRED_CLUSTER_TASKS &&
!preferred_cluster(cpu_rq(env->dst_cpu)->cluster, p))
return 0;
#endif

/* Don't detach task if it doesn't fit on the destination */
if (env->flags & LBF_IGNORE_BIG_TASKS &&
!task_fits_max(p, env->dst_cpu))
return 0;
#endif

if (task_running(env->src_rq, p)) {
schedstat_inc(p->se.statistics.nr_failed_migrations_running);
Expand Down

0 comments on commit 2d4d85f

Please sign in to comment.