]> git.baikalelectronics.ru Git - kernel.git/commit
thermal/cpufreq_cooling: Update offline CPUs per-cpu thermal_pressure
authorLukasz Luba <lukasz.luba@arm.com>
Mon, 14 Jun 2021 19:10:30 +0000 (20:10 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 17 Jun 2021 12:11:43 +0000 (14:11 +0200)
commit0767c436c5577a3e998ea90113378338f9de79c1
tree3bf363a327cd94889d6cc8c6b16be5ec8d6516b8
parenta3361f84493df92b85a23de7e2eae322948ffc6e
thermal/cpufreq_cooling: Update offline CPUs per-cpu thermal_pressure

The thermal pressure signal gives information to the scheduler about
reduced CPU capacity due to thermal. It is based on a value stored in
a per-cpu 'thermal_pressure' variable. The online CPUs will get the
new value there, while the offline won't. Unfortunately, when the CPU
is back online, the value read from per-cpu variable might be wrong
(stale data).  This might affect the scheduler decisions, since it
sees the CPU capacity differently than what is actually available.

Fix it by making sure that all online+offline CPUs would get the
proper value in their per-cpu variable when thermal framework sets
capping.

Fixes: 811c695a9cf91 ("thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20210614191030.22241-1-lukasz.luba@arm.com
drivers/thermal/cpufreq_cooling.c