From bbc8ceab18369d9d4b8337ba9b4a4ffabf95f080 Mon Sep 17 00:00:00 2001 From: Srivatsa Vaddagiri Date: Tue, 10 Jun 2014 17:09:03 -0700 Subject: 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 Signed-off-by: Syed Rameez Mustafa --- kernel/sched/fair.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kernel') diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4e7d93e9f8b6..7b9393f80788 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -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) -- cgit v1.2.3