Skip to content

Commit 61b82df

Browse files
vingu-linaroPeter Zijlstra
authored andcommitted
sched/fair: Do not try to migrate delayed dequeue task
Migrating a delayed dequeued task doesn't help in balancing the number of runnable tasks in the system. Signed-off-by: Vincent Guittot <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Dietmar Eggemann <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 736c55a commit 61b82df

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

kernel/sched/fair.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9391,11 +9391,15 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
93919391

93929392
/*
93939393
* We do not migrate tasks that are:
9394-
* 1) throttled_lb_pair, or
9395-
* 2) cannot be migrated to this CPU due to cpus_ptr, or
9396-
* 3) running (obviously), or
9397-
* 4) are cache-hot on their current CPU.
9394+
* 1) delayed dequeued unless we migrate load, or
9395+
* 2) throttled_lb_pair, or
9396+
* 3) cannot be migrated to this CPU due to cpus_ptr, or
9397+
* 4) running (obviously), or
9398+
* 5) are cache-hot on their current CPU.
93989399
*/
9400+
if ((p->se.sched_delayed) && (env->migration_type != migrate_load))
9401+
return 0;
9402+
93999403
if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu))
94009404
return 0;
94019405

0 commit comments

Comments
 (0)