Re: [PATCH v4 0/3] Improve the estimations in Intelligent Power Allocation

From: Lukasz Luba
Date: Thu Nov 26 2020 - 09:02:47 EST




On 11/26/20 1:09 PM, Daniel Lezcano wrote:
On 26/11/2020 13:49, Lukasz Luba wrote:
Hi Daniel,

On 11/24/20 4:10 PM, Lukasz Luba wrote:
Hi all,

The Intelligent Power Allocation (IPA) estimates the needed
coefficients for
internal algorithm. It can also estimate the sustainable power value
when the
DT has not provided one. Fix the 'k_i' coefficient which might be to big
related to the other values, when the sustainable power is in an abstract
scale. Do the estimation of sustainable power only once and avoid
expensive
calculation every time the IPA is called. Do the estimation of PID
constants
when there was user update via sysfs to sustainable power.

The patch set should apply on top next-20201124

Changes:
v4:
- added new function get_sustainable_power() which handles use cases
   when the value should be estimated again or simply returned
- added sustainable_power in the power_allocator_params to track if there
   was a change to sustainable_power by the user via sysfs
- addressed Daniel's comments that sustainable power set via sysfs should
   trigger PID coefficients estimation
- removed 'force' argument from estimate_pid_constants() and make it
ready
   for updates due to new value for sust. power from sysfs
- abandoned the design from v3 with a single function responsible for
   estimation both sust. power and PID const. requested by Ionela
v3 [1]:
- changed estimate_pid_constants to estimate_tzp_constants and related
comments
- estimate the PID coefficients always together with sust. power
- added print indicating that we are estimating sust. power and PID
const.
- don't use local variable 'sustainable_power'

Regards,
Lukasz Luba

[1]
https://lore.kernel.org/lkml/20201009135850.14727-1-lukasz.luba@xxxxxxx/

Lukasz Luba (3):
   thermal: power allocator: change the 'k_i' coefficient estimation
   thermal: power allocator: refactor sustainable power estimation
   thermal: power allocator: change the 'k_*' always in
     estimate_pid_constants()

  drivers/thermal/gov_power_allocator.c | 76 +++++++++++++++++----------
  1 file changed, 49 insertions(+), 27 deletions(-)


Gentle ping. This is a self contained change to only power allocator
file. It addresses also your requirement regarding sustainable_power
changed via sysfs.

Could you take it please? It should apply smoothly in your tree.

Actually, I'm waiting for Ionela and Dietmar ack.



Are they maintainers of this file that you need their ACKs?
Maybe I should drop mine then.