arch_topology: Introduce thermal pressure update function
authorLukasz Luba <lukasz.luba@arm.com>
Tue, 9 Nov 2021 19:57:10 +0000 (19:57 +0000)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 23 Nov 2021 09:40:26 +0000 (15:10 +0530)
commitc214f124161d446b340597e7c968e0a2dc149142
treee3421d0fd8a1b0d91c8e5609aaadf3a44d8f129f
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf
arch_topology: Introduce thermal pressure update function

The thermal pressure is a mechanism which is used for providing
information about reduced CPU performance to the scheduler. Usually code
has to convert the value from frequency units into capacity units,
which are understandable by the scheduler. Create a common conversion code
which can be just used via a handy API.

Internally, the topology_update_thermal_pressure() operates on frequency
in MHz and max CPU frequency is taken from 'freq_factor' (per-cpu).

Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
arch/arm/include/asm/topology.h
arch/arm64/include/asm/topology.h
drivers/base/arch_topology.c
include/linux/arch_topology.h
include/linux/sched/topology.h