mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Lukasz Luba <lukasz.luba@arm.com>
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 12:26:13 +0200	[thread overview]
Message-ID: <b6b27171-d43c-34d9-adac-20f4d7d21fc8@linaro.org> (raw)
In-Reply-To: <eafc2eb1-5b0f-61b9-b992-339a5a962fbd@arm.com>

On 22/04/2021 10:21, Lukasz Luba wrote:
> 
> 
> 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.

Yes, please. I think it is more logical.


-- 
<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

      reply	other threads:[~2021-04-22 10:26 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
2021-04-22 10:26       ` Daniel Lezcano [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=b6b27171-d43c-34d9-adac-20f4d7d21fc8@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amitk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --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®