diff options
author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2015-12-03 16:15:12 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:25:16 -0700 |
commit | 71a8c392b7f024f8e1ce08ec1401c321f7323cb3 (patch) | |
tree | c4a2dde90223c4c2b5680625040a14e7bf795d75 /kernel/sched/fair.c | |
parent | 6003b006be913b7b18092ad4f01d6482920a2924 (diff) |
sched: Take downmigrate threshold into consideration
If the tasks are run on the higher capacity cluster solely due to the
reason that they can not be be fit in the lower capacity cluster, the
downmigrate threshold prevents the frequent tasks migrations between
the clusters.
Change-Id: I234a23ffd907c2476c94d5f6227dab1bb6c9bebb
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fc31d1b48a2d..3d0ea41e86a1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2972,13 +2972,19 @@ done: static int task_load_will_fit(struct task_struct *p, u64 task_load, int cpu) { + int upmigrate; + if (cpu_capacity(cpu) == max_capacity) return 1; if (task_nice(p) > sched_upmigrate_min_nice || upmigrate_discouraged(p)) return 1; - if (task_load < sched_upmigrate) + upmigrate = sched_upmigrate; + if (cpu_capacity(task_cpu(p)) > cpu_capacity(cpu)) + upmigrate = sched_downmigrate; + + if (task_load < upmigrate) return 1; return 0; |