Commit deac4ee6 authored by Sven-Thorsten Dietrich's avatar Sven-Thorsten Dietrich Committed by Ingo Molnar

sched: simplify can_migrate_task()

Remove trivial conditional branch in Linux scheduler's
can_migrate_task() function.

   text    data     bss     dec     hex filename
   34770    2998      24   37792    93a0 sched.o.before
   34757    2998      24   37779    9393 sched.o.after
Signed-off-by: default avatarSven-Thorsten Dietrich <sven@thebigcorporation.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 71fd3714
...@@ -2180,12 +2180,6 @@ int can_migrate_task(struct task_struct *p, struct rq *rq, int this_cpu, ...@@ -2180,12 +2180,6 @@ int can_migrate_task(struct task_struct *p, struct rq *rq, int this_cpu,
if (task_running(rq, p)) if (task_running(rq, p))
return 0; return 0;
/*
* Aggressive migration if too many balance attempts have failed:
*/
if (sd->nr_balance_failed > sd->cache_nice_tries)
return 1;
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment