From: Lukasz Luba <lukasz.luba@arm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
amitk@kernel.org, rui.zhang@intel.com
Subject: Re: [PATCH v3 3/3] thermal: create a helper __thermal_cdev_update() without a lock
Date: Thu, 22 Apr 2021 09:21:30 +0100 [thread overview]
Message-ID: <eafc2eb1-5b0f-61b9-b992-339a5a962fbd@arm.com> (raw)
In-Reply-To: <3d08d5cf-9e3b-ae26-cfd5-bf9a40d11643@linaro.org>
On 4/22/21 8:58 AM, Daniel Lezcano wrote:
> On 21/04/2021 19:41, Lukasz Luba wrote:
>> There is a need to have a helper function which updates cooling device
>> state from the governors code. With this change governor can use
>> lock and unlock while calling helper function. This avoid unnecessary
>> second time lock/unlock which was in previous solution present in
>> governor implementation. This new helper function must be called
>> with mutex 'cdev->lock' hold.
>>
>> The changed been discussed and part of code presented in thread:
>> https://lore.kernel.org/linux-pm/20210419084536.25000-1-lukasz.luba@arm.com/
>>
>> Co-developed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
>> ---
>> drivers/thermal/gov_power_allocator.c | 5 +----
>> drivers/thermal/thermal_core.h | 1 +
>> drivers/thermal/thermal_helpers.c | 28 +++++++++++++++++----------
>
> Why not add this patch first (without the ipa changes) and then replace
> patch 2 by using the new function ? That will prevent to go back and forth.
I thought that it would show also the motivation and usage in the
governor. I can had this patch as first in the set, but then I thought
about this example.
I can change it if you like in v4.
next prev parent reply other threads:[~2021-04-22 8:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 17:41 [PATCH v3 0/3] Improve IPA mechanisms in low temperature state Lukasz Luba
2021-04-21 17:41 ` [PATCH v3 1/3] thermal: power_allocator: maintain the device statistics from going stale Lukasz Luba
2021-04-21 17:41 ` [PATCH v3 2/3] thermal: power_allocator: update once cooling devices when temp is low Lukasz Luba
2021-04-21 17:41 ` [PATCH v3 3/3] thermal: create a helper __thermal_cdev_update() without a lock Lukasz Luba
2021-04-22 7:58 ` Daniel Lezcano
2021-04-22 8:21 ` Lukasz Luba [this message]
2021-04-22 10:26 ` 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=eafc2eb1-5b0f-61b9-b992-339a5a962fbd@arm.com \
--to=lukasz.luba@arm.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@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
all inboxes | Powered by JetHome®