mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhang, Rui" <rui.zhang@intel.com>
To: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Cc: "lukasz.luba@arm.com" <lukasz.luba@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
	"peter@piie.net" <peter@piie.net>
Subject: Re: [PATCH v1 1/4] thermal: gov_bang_bang: Call __thermal_cdev_update() directly
Date: Wed, 14 Aug 2024 06:18:20 +0000	[thread overview]
Message-ID: <28c4f62c7f4ae2a94c2bb36e82f9827332b8205f.camel@intel.com> (raw)
In-Reply-To: <13583081.uLZWGnKmhe@rjwysocki.net>

On Tue, 2024-08-13 at 16:25 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Instead of clearing the "updated" flag for each cooling device
> affected by the trip point crossing in bang_bang_control() and
> walking all thermal instances to run thermal_cdev_update() for all
> of the affected cooling devices, call __thermal_cdev_update()
> directly for each of them.

with this change, we may invoke thermal_cdev_set_cur_state() for
multiple times instead of one, in one bang_bang_control() run.

So this effectively changes the notifications and statistics.

If this is not a problem, maybe better to mention this change in the
changelog?

thanks,
rui
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/thermal/gov_bang_bang.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> Index: linux-pm/drivers/thermal/gov_bang_bang.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/gov_bang_bang.c
> +++ linux-pm/drivers/thermal/gov_bang_bang.c
> @@ -71,12 +71,9 @@ static void bang_bang_control(struct the
>                 dev_dbg(&instance->cdev->device, "target=%ld\n",
> instance->target);
>  
>                 mutex_lock(&instance->cdev->lock);
> -               instance->cdev->updated = false; /* cdev needs update
> */
> +               __thermal_cdev_update(instance->cdev);
>                 mutex_unlock(&instance->cdev->lock);
>         }
> -
> -       list_for_each_entry(instance, &tz->thermal_instances,
> tz_node)
> -               thermal_cdev_update(instance->cdev);
>  }
>  
>  static struct thermal_governor thermal_gov_bang_bang = {
> 
> 
> 


  parent reply	other threads:[~2024-08-14  6:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 14:23 [PATCH v1 0/4] thermal: gov_bang_bang: Prevent cooling devices from getting stuck in the "on" state Rafael J. Wysocki
2024-08-13 14:25 ` [PATCH v1 1/4] thermal: gov_bang_bang: Call __thermal_cdev_update() directly Rafael J. Wysocki
2024-08-13 21:03   ` Peter Kästle
2024-08-14  6:18   ` Zhang, Rui [this message]
2024-08-14 17:34     ` Rafael J. Wysocki
2024-08-16  3:00   ` Zhang, Rui
2024-08-13 14:26 ` [PATCH v1 2/4] thermal: gov_bang_bang: Split bang_bang_control() Rafael J. Wysocki
2024-08-13 21:03   ` Peter Kästle
2024-08-16  3:00   ` Zhang, Rui
2024-08-13 14:27 ` [PATCH v1 3/4] thermal: gov_bang_bang: Add .manage() callback Rafael J. Wysocki
2024-08-13 21:04   ` Peter Kästle
2024-08-13 21:07   ` Peter Kästle
2024-08-14 17:18     ` Rafael J. Wysocki
2024-08-14 20:55       ` Peter Kästle
2024-08-16  3:00   ` Zhang, Rui
2024-08-13 14:29 ` [PATCH v1 4/4] thermal: gov_bang_bang: Use governor_data to reduce overhead Rafael J. Wysocki
2024-08-13 21:08   ` Peter Kästle
2024-08-14  6:09   ` Zhang, Rui
2024-08-14 17:26     ` Rafael J. Wysocki
2024-08-15  3:26       ` Zhang, Rui
2024-08-15 12:35         ` Rafael J. Wysocki
2024-08-16  2:59           ` Zhang, Rui

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=28c4f62c7f4ae2a94c2bb36e82f9827332b8205f.camel@intel.com \
    --to=rui.zhang@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=peter@piie.net \
    --cc=rjw@rjwysocki.net \
    /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®