aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKapileshwar Singh <kapileshwar.singh@arm.com>2015-06-15 16:43:34 +0100
committerVincent Guittot <vincent.guittot@linaro.org>2015-08-10 17:56:52 +0200
commit1a14516eb1fea400bc6ffb256c9bbdd19a3172e2 (patch)
treedd9870c3f70c71458e4e94c4224c646ebc755fca
parentf8e5e8dfb60afde4871f20385819543fbce45255 (diff)
WIP: sched: WakeMigration: NOHZ kick from a Lower Capacity CPU
If a lower capacity CPU is overutilized due to a single task running on it. It makes sense to wake up other CPUs for finding a better/higher capacity CPU which can service the task. Change-Id: Ifc745c30df034b765ae6a38cf5b16ac9e0093f14 Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
-rw-r--r--kernel/sched/fair.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index dcf8f36d2e5e..7569201a1f07 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8584,6 +8584,17 @@ static inline bool nohz_kick_needed(struct rq *rq)
if (time_before(now, nohz.next_balance))
return false;
+ /* If the CPU is saturated (overutilized by a
+ * single task and is not the highest capacity
+ * CPU in the system. It is worth initiating a
+ * a nohz kick, so that rebalance domains can
+ * place this task on a higher capacity CPU
+ */
+ if (energy_aware()
+ && cpu_saturated(cpu)
+ && capacity_orig_of(cpu) != SCHED_CAPACITY_SCALE)
+ return true;
+
if (rq->nr_running >= 2 &&
(!energy_aware() || cpu_overutilized(cpu)))
return true;