From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Lukasz Luba <lukasz.luba@arm.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH v1 07/16] thermal: gov_power_allocator: Eliminate a redundant variable
Date: Tue, 23 Apr 2024 20:09:41 +0200 [thread overview]
Message-ID: <61560bc6-d453-4b0c-a4ea-b375d547b143@linaro.org> (raw)
In-Reply-To: <CAJZ5v0hR-fN08g-g_S261e+U=2Enfza3b9NZpmp4yhzAa=426A@mail.gmail.com>
On 23/04/2024 20:05, Rafael J. Wysocki wrote:
> On Tue, Apr 23, 2024 at 8:00 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>>
>> On 23/04/2024 19:54, Rafael J. Wysocki wrote:
>>> On Tue, Apr 23, 2024 at 7:35 PM Daniel Lezcano
>>> <daniel.lezcano@linaro.org> wrote:
>>>>
>>>> On 10/04/2024 18:12, Rafael J. Wysocki wrote:
>>>>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>>>
>>>>> Notice that the passive field in struct thermal_zone_device is not
>>>>> used by the Power Allocator governor itself and so the ordering of
>>>>> its updates with respect to allow_maximum_power() or allocate_power()
>>>>> does not matter.
>>>>>
>>>>> Accordingly, make power_allocator_manage() update that field right
>>>>> before returning, which allows the current value of it to be passed
>>>>> directly to allow_maximum_power() without using the additional update
>>>>> variable that can be dropped.
>>>>>
>>>>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>>> ---
>>>>
>>>> The step_wise and the power allocator are changing the tz->passive
>>>> values, so telling the core to start and stop the passive mitigation timer.
>>>>
>>>> It looks strange that a plugin controls the core internal and not the
>>>> opposite.
>>>>
>>>> I'm wondering if it would not make sense to have the following ops:
>>>>
>>>> .start
>>>> .stop
>>>>
>>>> .start is called when the first trip point is crossed the way up
>>>> .stop is called when the first trip point is crossed the way down
>>>>
>>>> - The core is responsible to start and stop the passive mitigation timer.
>>>>
>>>> - the governors do no longer us tz->passive
>>>>
>>>> The reset of the governor can happen at start or stop, as well as the
>>>> device cooling states.
>>>
>>> I have a patch that simply increments tz->passive when a passive trip
>>> point is passed on the way up and decrements it when a passive trip
>>> point is crossed on the way down. It appears to work reasonably well.
>>
>> Does it make the governors getting ride of it ? Or at least not changing
>> its value ?
>
> Not yet, but I'm going to update it this way. The governors should
> not mess up with tz->passive IMV.
+1
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2024-04-23 18:09 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 15:41 [PATCH v1 00/16] thermal: core: Redesign the governor interface Rafael J. Wysocki
2024-04-10 16:04 ` [PATCH v1 02/16] thermal: gov_bang_bang: Use .trip_crossed() instead of .throttle() Rafael J. Wysocki
2024-04-19 9:34 ` Lukasz Luba
2024-04-23 17:04 ` Daniel Lezcano
2024-04-10 16:05 ` [PATCH v1 03/16] thermal: gov_bang_bang: Clean up thermal_zone_trip_update() Rafael J. Wysocki
2024-04-19 9:41 ` Lukasz Luba
2024-04-23 17:05 ` Daniel Lezcano
2024-04-10 16:06 ` [PATCH v1 04/16] thermal: gov_bang_bang: Fold thermal_zone_trip_update() into its caller Rafael J. Wysocki
2024-04-19 9:42 ` Lukasz Luba
2024-04-23 17:06 ` Daniel Lezcano
2024-04-10 16:08 ` [PATCH v1 05/16] thermal: core: Introduce .manage() callback for thermal governors Rafael J. Wysocki
2024-04-19 9:44 ` Lukasz Luba
2024-04-23 17:07 ` Daniel Lezcano
2024-04-10 16:10 ` [PATCH v1 06/16] thermal: gov_power_allocator: Use .manage() callback instead of .throttle() Rafael J. Wysocki
2024-04-19 9:50 ` Lukasz Luba
2024-04-10 16:10 ` [PATCH v1 01/16] thermal: core: Introduce .trip_crossed() callback for thermal governors Rafael J. Wysocki
2024-04-19 8:47 ` Lukasz Luba
2024-04-23 17:14 ` Daniel Lezcano
2024-04-23 17:25 ` Rafael J. Wysocki
2024-04-23 17:58 ` Daniel Lezcano
2024-04-10 16:12 ` [PATCH v1 07/16] thermal: gov_power_allocator: Eliminate a redundant variable Rafael J. Wysocki
2024-04-19 9:56 ` Lukasz Luba
2024-04-23 17:35 ` Daniel Lezcano
2024-04-23 17:54 ` Rafael J. Wysocki
2024-04-23 18:00 ` Daniel Lezcano
2024-04-23 18:05 ` Rafael J. Wysocki
2024-04-23 18:09 ` Daniel Lezcano [this message]
2024-04-10 16:13 ` [PATCH v1 08/16] thermal: gov_step_wise: Use .manage() callback instead of .throttle() Rafael J. Wysocki
2024-04-19 17:20 ` Lukasz Luba
2024-04-24 7:54 ` Daniel Lezcano
2024-04-10 16:43 ` [PATCH v1 09/16] thermal: gov_step_wise: Use trip thresholds instead of trip temperatures Rafael J. Wysocki
2024-04-19 19:11 ` Lukasz Luba
2024-04-24 7:03 ` Daniel Lezcano
2024-04-10 16:44 ` [PATCH v1 10/16] thermal: gov_step_wise: Clean up thermal_zone_trip_update() Rafael J. Wysocki
2024-04-19 18:21 ` Lukasz Luba
2024-04-10 16:57 ` [PATCH v1 11/16] thermal: gov_fair_share: Use .manage() callback instead of .throttle() Rafael J. Wysocki
2024-04-19 18:28 ` Lukasz Luba
2024-04-10 16:58 ` [PATCH v1 12/16] thermal: gov_fair_share: Use trip thresholds instead of trip temperatures Rafael J. Wysocki
2024-04-19 19:18 ` Lukasz Luba
2024-04-10 17:00 ` [PATCH v1 13/16] thermal: gov_fair_share: Eliminate unnecessary integer divisions Rafael J. Wysocki
2024-04-19 18:46 ` Lukasz Luba
2024-04-10 17:03 ` [PATCH v1 14/16] thermal: gov_user_space: Use .trip_crossed() instead of .throttle() Rafael J. Wysocki
2024-04-19 18:16 ` Lukasz Luba
2024-04-24 9:14 ` Daniel Lezcano
2024-04-24 11:32 ` Srinivas Pandruvada
2024-04-24 11:34 ` Daniel Lezcano
2024-04-24 11:44 ` Srinivas Pandruvada
2024-04-10 17:42 ` [PATCH v1 15/16] thermal: core: Drop the .throttle() governor callback Rafael J. Wysocki
2024-04-19 18:50 ` Lukasz Luba
2024-04-24 9:11 ` Daniel Lezcano
2024-04-10 17:44 ` [PATCH v1 16/16] thermal: core: Relocate critical and hot trip handling Rafael J. Wysocki
2024-04-19 18:52 ` Lukasz Luba
2024-04-24 9:17 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61560bc6-d453-4b0c-a4ea-b375d547b143@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox