diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-12-10 00:02:28 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-01-15 13:36:27 +0100 |
commit | 55b74e57f9fc6a32802159f59bb12d4f9e8ab4c7 (patch) | |
tree | f25d3a5355e3857d1596d9be84236c255ebbc0bd | |
parent | d17d1a6379ba7374824065965455216d0116b65e (diff) |
sched: fair: Don't wake up a cpu before its break even
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | kernel/sched/fair.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index be979d28b815..d8b325ef3a41 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4452,6 +4452,16 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu) struct cpuidle_state *idle = idle_get_state(rq); if (idle) { + + /* + * When we want to save energy, exclude cpu which did not reach + * the break even point in the idle state + */ + if (sched_feat(ENERGY_IDLE) && + ((ktime_to_us(ktime_get()) - idle->idle_stamp < + idle->target_residency))) + continue; + if (idle->exit_latency < min_exit_latency) { /* * We give priority to a CPU |