Re: [PATCH v2 0/4] thermal: core/ACPI: Fix processor cooling device regression

From: Zhang, Rui
Date: Mon Mar 13 2023 - 22:02:52 EST


On Mon, 2023-03-13 at 19:02 +0100, Rafael J. Wysocki wrote:
> On Mon, Mar 13, 2023 at 5:47 PM Zhang, Rui <rui.zhang@xxxxxxxxx>
> wrote:
> > Hi, Rafael,
> >
> > The only concern to me is that, in thermal_cooling_device_update(),
> > we
> > should handle the cases that the cooling device is current used by
> > one/more thermal zone. say, something like
> >
> > list_for_each_entry(pos, &cdev->thermal_instances, cdev_node) {
> > /* e.g. what to do if tz1 set it to state 1 previously */
> > }
> > I have not got a clear idea what we should do here.
>
> For each instance, set upper to max_state if above it and set target
> to upper if above it I'd say.
>

Say, before update,
max_state: 3
target: 1
upper is set to 3 because upper == THERMAL_NO_LIMIT during binding

then, after update
max_state: 7
target: ?
upper: ?

Maybe we should do unbind and rebind, and then set target
to THERMAL_NO_TARGET? it is really the governor that should set the
target.

> I guess otherwise there may be some confusion in principle and I have
> missed that piece, so thanks for pointing it out!
>
> > But given that I have confirmed that this patch series fixes the
> > original problem, and the ACPI passive cooling is unlikely to be
> > triggered before CPUFREQ_CREATE_POLICY notification, probably we
> > can
> > address that problem later.
> >
> > Tested-by: Zhang Rui <rui.zhang@xxxxxxxxx>
> > Reviewed-by: Zhang Rui <rui.zhang@xxxxxxxxx>
>
>
I recalled that patchwork used to catch these tags here and apply them
to every patches in the series, so the tags are appended automatically
when applying the patches. But it apparently does not work now.

Let me reply to the patches one by one.

thanks,
rui