Re: cpufreq/thermal regression in 6.10
From: Rafael J. Wysocki
Date: Fri Jun 21 2024 - 12:42:57 EST
Hi,
On Fri, Jun 21, 2024 at 5:53 PM Jens Glathe
<jens.glathe@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi there,
>
> unfortunately I experienced the issue with the fix applied. I had to
> revert this and the original commit to get back to normal behaviour. My
> system (also Lenovo Thinkpad X13s) uses the schedutil governor, the
> behaviour is as described from Steev and Johan. The full throttling
> happened during a package build and left the performance cores at 940800.
So can you please test the attached patch, on top of the fix?
---
drivers/thermal/gov_step_wise.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
Index: linux-pm/drivers/thermal/gov_step_wise.c
===================================================================
--- linux-pm.orig/drivers/thermal/gov_step_wise.c
+++ linux-pm/drivers/thermal/gov_step_wise.c
@@ -55,7 +55,7 @@ static unsigned long get_target_state(st
if (cur_state <= instance->lower)
return THERMAL_NO_TARGET;
- return clamp(cur_state - 1, instance->lower, instance->upper);
+ return instance->lower;
}
return instance->target;
@@ -93,23 +93,6 @@ static void thermal_zone_trip_update(str
if (instance->initialized && old_target == instance->target)
continue;
- if (trip->type == THERMAL_TRIP_PASSIVE) {
- /*
- * If the target state for this thermal instance
- * changes from THERMAL_NO_TARGET to something else,
- * ensure that the zone temperature will be updated
- * (assuming enabled passive cooling) until it becomes
- * THERMAL_NO_TARGET again, or the cooling device may
- * not be reset to its initial state.
- */
- if (old_target == THERMAL_NO_TARGET &&
- instance->target != THERMAL_NO_TARGET)
- tz->passive++;
- else if (old_target != THERMAL_NO_TARGET &&
- instance->target == THERMAL_NO_TARGET)
- tz->passive--;
- }
-
instance->initialized = true;
mutex_lock(&instance->cdev->lock);