Bug 212501 - IPA governor always sets the cooling device state to zero when there is no mitigation
Summary: IPA governor always sets the cooling device state to zero when there is no mi...
Status: RESOLVED CODE_FIX
Alias: None
Product: Power Management
Classification: Unclassified
Component: Thermal (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-31 11:54 UTC by Daniel Lezcano
Modified: 2021-05-31 08:32 UTC (History)
1 user (show)

See Also:
Kernel Version: v5.12
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Daniel Lezcano 2021-03-31 11:54:51 UTC
The throttle function of the power allocator always calls allow_maximum_power() which in turns sets the cooling device state to zero.

As the cooling device state change generates an event, at each timer expiration for mitigation or monitoring, the event is generated for nothing as we set the set state to zero.

The function allow_maximum_power() should be called only when the mitigation switches off.
Comment 1 Lukasz Luba 2021-03-31 15:15:45 UTC
Hi Daniel,
I see your point that we shouldn't generate an event when the device state has not changed. I have to address another issue in there. We shouldn't just ignore calling allow_maximum_power(), the device should be checked, which is currently missing. I will implement the call to update cooling device only once, when for the first time temperature dropped below switch_on_temp, but I will loop through the cooling devices getting their state. If it's not done then the statistics are stale.
Comment 2 Lukasz Luba 2021-05-21 13:55:20 UTC
The issue is solved in mainline by:
commit 0952177f2a1f63b ("thermal/core/power_allocator: Update once cooling devices when temp is low")

So we can close this issue.

Note You need to log in before you can comment on or make changes to this bug.