sched: Avoid active migration of small tasks

We currently check the need to migrate the currently running task in
scheduler_tick(). Skip that check for small tasks, as its not worth
the effort!

Change-Id: Ic205cc6452f42fde6be6b85c3bf06a8542a73eba
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
This commit is contained in:
Srivatsa Vaddagiri 2014-06-10 17:09:03 -07:00 committed by David Keitel
parent 9b71fb7cbb
commit bbc8ceab18

View file

@ -3105,6 +3105,9 @@ static inline int migration_needed(struct rq *rq, struct task_struct *p)
{
int nice = task_nice(p);
if (is_small_task(p))
return 0;
/* Todo: cgroup-based control? */
if (nice > sysctl_sched_upmigrate_min_nice &&
rq->capacity > min_capacity)