mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Yu-Che Cheng <giver@chromium.org>,
	Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chen-Yu Tsai <wenst@chromium.org>
Subject: Re: [PATCH v2] thermal: gov_power_allocator: Update total_weight on bind and cdev updates
Date: Thu, 27 Feb 2025 14:28:10 +0000	[thread overview]
Message-ID: <89e0f700-26a8-4d0f-a533-aba7ddac521e@arm.com> (raw)
In-Reply-To: <CAJZ5v0jgRXoqx4g=iHSUteXs99ageQmcQDQfjp6eSqnVo9Ty8Q@mail.gmail.com>



On 2/25/25 11:35, Rafael J. Wysocki wrote:
> On Sat, Feb 22, 2025 at 4:20 AM Yu-Che Cheng <giver@chromium.org> wrote:
>>
>> params->total_weight is not initialized during bind and not updated when
>> the bound cdev changes. The cooling device weight will not be used due
>> to the uninitialized total_weight, until we trigger an update via sysfs.
>>
>> The bound cdev update will be triggered during thermal zone registration,
>> where each cooling device will be bound to the thermal zone one by one.
>>
>> The power_allocator_bind can be called without additional cdev update
>> when manually changing the policy of a thermal zone via sysfs.
>>
>> Add a new function to handle weight update logic, including updating
>> total_weight, and call it when bind, weight changes, and cdev updates to
>> ensure total_weight is always correct.
>>
>> Fixes: a3cd6db4cc2e ("thermal: gov_power_allocator: Support new update callback of weights")
>> Signed-off-by: Yu-Che Cheng <giver@chromium.org>
> 
> Applied as 6.14-rc material with some minor edits in the changelog.
> 
> Lukasz, if you have any objections, please let me know.

My apologies for the delay. Thanks Rafael for taking this into your
tree.

No objections, thanks Yu-Che for the fix.

The code looks good and if it's not too late then:

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

Regards,
Lukasz


      reply	other threads:[~2025-02-27 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22  3:20 Yu-Che Cheng
2025-02-25 11:35 ` Rafael J. Wysocki
2025-02-27 14:28   ` Lukasz Luba [this message]

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=89e0f700-26a8-4d0f-a533-aba7ddac521e@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=giver@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=wenst@chromium.org \
    /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

all inboxes | Powered by JetHome®