lkml.org 
[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V3 3/3] thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping
Date
Enable cpufreq cooling device to update the thermal pressure in
event of a capped maximum frequency or removal of capped maximum
frequency.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
---
drivers/thermal/cpu_cooling.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 6fff161..d5cc3c3 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -31,6 +31,7 @@
#include <linux/slab.h>
#include <linux/cpu.h>
#include <linux/cpu_cooling.h>
+#include <linux/sched/thermal.h>

#include <trace/events/thermal.h>

@@ -177,6 +178,9 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,

if (policy->max > clipped_freq)
cpufreq_verify_within_limits(policy, 0, clipped_freq);
+
+ sched_update_thermal_pressure(policy->cpus,
+ policy->max, policy->cpuinfo.max_freq);
break;
}
mutex_unlock(&cooling_list_lock);
--
2.1.4
\
 
 \ /
  Last update: 2019-04-16 21:39    [W:0.343 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site