Skip to content

Commit

Permalink
sched: simplify can_migrate_task()
Browse files Browse the repository at this point in the history
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: Sven-Thorsten Dietrich <sven@thebigcorporation.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Sven-Thorsten Dietrich authored and Ingo Molnar committed Aug 24, 2007
1 parent 71fd371 commit deac4ee
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2180,12 +2180,6 @@ int can_migrate_task(struct task_struct *p, struct rq *rq, int this_cpu,
if (task_running(rq, p))
return 0;

/*
* Aggressive migration if too many balance attempts have failed:
*/
if (sd->nr_balance_failed > sd->cache_nice_tries)
return 1;

return 1;
}

Expand Down

0 comments on commit deac4ee

Please sign in to comment.