[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <158350572893.28353.7818128953864188600.tip-bot2@tip-bot2>
Date: Fri, 06 Mar 2020 14:42:08 -0000
From: "tip-bot2 for Thara Gopinath" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Thara Gopinath <thara.gopinath@...aro.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: sched/core] sched/fair: Update cpu_capacity to reflect thermal pressure
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 467b7d01c469dc6aa492c17d1f1d1952632728f1
Gitweb: https://git.kernel.org/tip/467b7d01c469dc6aa492c17d1f1d1952632728f1
Author: Thara Gopinath <thara.gopinath@...aro.org>
AuthorDate: Fri, 21 Feb 2020 19:52:11 -05:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 06 Mar 2020 12:57:20 +01:00
sched/fair: Update cpu_capacity to reflect thermal pressure
cpu_capacity initially reflects the maximum possible capacity of a CPU.
Thermal pressure on a CPU means this maximum possible capacity is
unavailable due to thermal events. This patch subtracts the average
thermal pressure for a CPU from its maximum possible capacity so that
cpu_capacity reflects the remaining maximum capacity.
Signed-off-by: Thara Gopinath <thara.gopinath@...aro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Link: https://lkml.kernel.org/r/20200222005213.3873-8-thara.gopinath@linaro.org
---
kernel/sched/fair.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 11f8488..aa51286 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7984,8 +7984,15 @@ static unsigned long scale_rt_capacity(struct sched_domain *sd, int cpu)
if (unlikely(irq >= max))
return 1;
+ /*
+ * avg_rt.util_avg and avg_dl.util_avg track binary signals
+ * (running and not running) with weights 0 and 1024 respectively.
+ * avg_thermal.load_avg tracks thermal pressure and the weighted
+ * average uses the actual delta max capacity(load).
+ */
used = READ_ONCE(rq->avg_rt.util_avg);
used += READ_ONCE(rq->avg_dl.util_avg);
+ used += thermal_load_avg(rq);
if (unlikely(used >= max))
return 1;
Powered by blists - more mailing lists