summaryrefslogtreecommitdiffstats
path: root/meta-eas/recipes-kernel/linux/linux-renesas/0022-sched-Enable-idle-balance-to-pull-single-task-toward.patch
diff options
context:
space:
mode:
authorFrode Isaksen <fisaksen@baylibre.com>2017-12-19 11:15:35 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-02-07 11:47:29 +0000
commitc4a6287185179732dfc1e903c195ff90c19f1065 (patch)
treed35f5010dbd952e40f5c178322026445b55757c1 /meta-eas/recipes-kernel/linux/linux-renesas/0022-sched-Enable-idle-balance-to-pull-single-task-toward.patch
parent109dea1d5c5a38807b098b588584636ae636a302 (diff)
This layer provides Energy Aware Scheduling (EAS) patcheseel_5.1.0eel_5.0.3eel_5.0.2eel/5.1.0eel/5.0.3eel/5.0.25.1.05.0.35.0.2eel
For the moment only for Renesas R-Car Gen3 SoC's. Can be expanded for other SoC's by setting the machine feature biglittle and provide the relevant EAS patches. Bug-AGL: SPEC-813 Change-Id: I2b5e69c515c33e57be19b30466fe208d7b8ac1a5 Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Diffstat (limited to 'meta-eas/recipes-kernel/linux/linux-renesas/0022-sched-Enable-idle-balance-to-pull-single-task-toward.patch')
-rw-r--r--meta-eas/recipes-kernel/linux/linux-renesas/0022-sched-Enable-idle-balance-to-pull-single-task-toward.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-eas/recipes-kernel/linux/linux-renesas/0022-sched-Enable-idle-balance-to-pull-single-task-toward.patch b/meta-eas/recipes-kernel/linux/linux-renesas/0022-sched-Enable-idle-balance-to-pull-single-task-toward.patch
new file mode 100644
index 0000000..d8d1877
--- /dev/null
+++ b/meta-eas/recipes-kernel/linux/linux-renesas/0022-sched-Enable-idle-balance-to-pull-single-task-toward.patch
@@ -0,0 +1,55 @@
+From 23326036926c9495301467238107ab942286aa54 Mon Sep 17 00:00:00 2001
+From: Dietmar Eggemann <dietmar.eggemann@arm.com>
+Date: Mon, 26 Jan 2015 19:47:28 +0000
+Subject: [PATCH 22/92] sched: Enable idle balance to pull single task towards
+ cpu with higher capacity
+
+We do not want to miss out on the ability to pull a single remaining
+task from a potential source cpu towards an idle destination cpu. Add an
+extra criteria to need_active_balance() to kick off active load balance
+if the source cpu is over-utilized and has lower capacity than the
+destination cpu.
+
+cc: Ingo Molnar <mingo@redhat.com>
+cc: Peter Zijlstra <peterz@infradead.org>
+Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
+Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
+(cherry picked from commit 006d246f483211175d75b8a2b90000c36c486b7d)
+Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
+---
+ kernel/sched/fair.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
+index 341fccd..cb283ca 100644
+--- a/kernel/sched/fair.c
++++ b/kernel/sched/fair.c
+@@ -5859,6 +5859,11 @@ static int wake_cap(struct task_struct *p, int cpu, int prev_cpu)
+ return min_cap * 1024 < task_util(p) * capacity_margin;
+ }
+
++static bool cpu_overutilized(int cpu)
++{
++ return (capacity_of(cpu) * 1024) < (cpu_util(cpu) * capacity_margin);
++}
++
+ /*
+ * select_task_rq_fair: Select target runqueue for the waking task in domains
+ * that have the 'sd_flag' flag set. In practice, this is SD_BALANCE_WAKE,
+@@ -7924,6 +7929,13 @@ static int need_active_balance(struct lb_env *env)
+ return 1;
+ }
+
++ if ((capacity_of(env->src_cpu) < capacity_of(env->dst_cpu)) &&
++ env->src_rq->cfs.h_nr_running == 1 &&
++ cpu_overutilized(env->src_cpu) &&
++ !cpu_overutilized(env->dst_cpu)) {
++ return 1;
++ }
++
+ return unlikely(sd->nr_balance_failed > sd->cache_nice_tries+2);
+ }
+
+--
+1.9.1
+