Bug 212507
Summary: | Switching IPA and step_wise governors screw up tz->passive | ||
---|---|---|---|
Product: | Power Management | Reporter: | Daniel Lezcano (daniel.lezcano) |
Component: | Thermal | Assignee: | Zhang Rui (rui.zhang) |
Status: | NEW --- | ||
Severity: | normal | CC: | lukasz.luba |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | v5.12 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Daniel Lezcano
2021-03-31 15:42:42 UTC
I've reproduced locally the issue and can see what you mean. The problem is not with IPA, but inside step_wise. The logic in step_wise which enables/disables passive is odd. It abuses the fact that 'tz->passive' is int and not bool, as it should be and also comment states that for thermal_zone_device structure. Step_wise is looping over the cooling devices and increments or decrements this tz->passive value. IMO the tz->passive filed should be changed to 'bool' and this arithmetic operations in governors should be forbidden. Just found this while going through the PM bug reports. will any of you fix this? :) |