diff options
| -rw-r--r-- | Documentation/scheduler/sched-zone.txt | 12 | ||||
| -rw-r--r-- | kernel/sched/fair.c | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/Documentation/scheduler/sched-zone.txt b/Documentation/scheduler/sched-zone.txt index db2dc9e1c125..0af33595508d 100644 --- a/Documentation/scheduler/sched-zone.txt +++ b/Documentation/scheduler/sched-zone.txt @@ -1268,6 +1268,18 @@ CPU across all clusters. When this tunable is enabled, the RT tasks are restricted to the lowest possible power cluster. +*** 7.25 sched_downmigrate + +Appears at: /proc/sys/kernel/sched_downmigrate + +Default value: 60 + +This tunable is a percentage. It exists to control hysteresis. Lets say a task +migrated to a high-performance cpu when it crossed 80% demand on a +power-efficient cpu. We don't let it come back to a power-efficient cpu until +its demand *in reference to the power-efficient cpu* drops less than 60% +(sched_downmigrate). + ========================= 8. HMP SCHEDULER TRACE POINTS ========================= 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; |
