diff options
author | Frode Isaksen <fisaksen@baylibre.com> | 2017-12-19 11:15:35 +0000 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2018-02-07 11:47:29 +0000 |
commit | c4a6287185179732dfc1e903c195ff90c19f1065 (patch) | |
tree | d35f5010dbd952e40f5c178322026445b55757c1 /meta-eas/recipes-kernel/linux/linux-renesas/0058-sched-fair-Add-energy_diff-dead-zone-margin.patch | |
parent | 109dea1d5c5a38807b098b588584636ae636a302 (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/0058-sched-fair-Add-energy_diff-dead-zone-margin.patch')
-rw-r--r-- | meta-eas/recipes-kernel/linux/linux-renesas/0058-sched-fair-Add-energy_diff-dead-zone-margin.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-eas/recipes-kernel/linux/linux-renesas/0058-sched-fair-Add-energy_diff-dead-zone-margin.patch b/meta-eas/recipes-kernel/linux/linux-renesas/0058-sched-fair-Add-energy_diff-dead-zone-margin.patch new file mode 100644 index 0000000..163fb7c --- /dev/null +++ b/meta-eas/recipes-kernel/linux/linux-renesas/0058-sched-fair-Add-energy_diff-dead-zone-margin.patch @@ -0,0 +1,53 @@ +From 91820aa3145f93421c29834315616f338b4fcca2 Mon Sep 17 00:00:00 2001 +From: Morten Rasmussen <morten.rasmussen@arm.com> +Date: Wed, 30 Mar 2016 14:20:12 +0100 +Subject: [PATCH 58/92] sched/fair: Add energy_diff dead-zone margin + +It is not worth the overhead to migrate tasks for tiny insignificant +energy savings. To prevent this, an energy margin is introduced in +energy_diff() which effectively adds a dead-zone that rounds tiny energy +differences to zero. Since no scale is enforced for energy model data +the margin can't be absolute. Instead it is defined as +/-1.56% energy +saving compared to the current total estimated energy consumption. + +(cherry picked from commit c36ecf27db72f60934ce2c9ca7e3d97a80926c1c) +Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com> +--- + kernel/sched/fair.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c +index 799e2b5..5e13787 100644 +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -5556,6 +5556,7 @@ static int energy_diff(struct energy_env *eenv) + struct sched_domain *sd; + struct sched_group *sg; + int sd_cpu = -1, energy_before = 0, energy_after = 0; ++ int diff, margin; + + struct energy_env eenv_before = { + .util_delta = 0, +@@ -5588,7 +5589,18 @@ static int energy_diff(struct energy_env *eenv) + } + } while (sg = sg->next, sg != sd->groups); + +- return energy_after-energy_before; ++ /* ++ * Dead-zone margin preventing too many migrations. ++ */ ++ ++ margin = energy_before >> 6; /* ~1.56% */ ++ ++ diff = energy_after-energy_before; ++ ++ if (abs(diff) < margin) ++ return 0; ++ ++ return diff; + } + + /* +-- +1.9.1 + |