public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Jens Glathe <jens.glathe@oldschoolsolutions.biz>,
	Steev Klimaszewski <steev@kali.org>,
	Johan Hovold <johan+linaro@kernel.org>
Subject: Re: [PATCH v1] thermal: gov_step_wise: Go straight to instance->lower when mitigation is over
Date: Tue, 25 Jun 2024 09:34:30 +0200	[thread overview]
Message-ID: <ZnpzBuWbKxbrKvoR@hovoldconsulting.com> (raw)
In-Reply-To: <12464461.O9o76ZdvQC@rjwysocki.net>

On Sat, Jun 22, 2024 at 02:26:33PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Commit b6846826982b ("thermal: gov_step_wise: Restore passive polling
> management") attempted to fix a Step-Wise thermal governor issue
> introduced by commit 042a3d80f118 ("thermal: core: Move passive polling
> management to the core"), which caused the governor to leave cooling
> devices in high states, by partially revering that commit.

typo: reverting 
 
> However, this turns out to be insufficient on some systems due to
> interactions between the governor code restored by commit b6846826982b
> and the passive polling management in the thermal core.

Care to elaborate on what went wrong here? In my test of the previous
fix I saw the frequency ramping up in steps as expected when the
temperature dropped. Under what circumstances would that fail to happen?

> For this reason, revert commit b6846826982b and make the governor set
> the target cooling device state to the "lower" one as soon as the zone
> temperature falls below the threshold of the trip point corresponding
> to the given thermal instance, which means that thermal mitigation is
> not necessary any more.
> 
> Before this change the "lower" cooling device state would be reached in
> steps through the passive polling mechanism which was questionable for
> three reasons: (1) cooling device were kept in high states when that was
> not necessary (and it could adversely impact performance), (2) it only
> worked for thermal zones with nonzero passive_delay_jiffies value, and
> (3) passive polling belongs to the core and should not be hijacked by
> governors for their internal purposes.

I've tested this patch on the Lenovo ThinkPad X13s, where I could
reproduce the rc1 regression, and things works as intended with the
fix applied to rc5:

Tested-by: Johan Hovold <johan+linaro@kernel.org>

The CPU frequency still oscillates heavily but now with a more
sawtoothed curve.

Not sure if it helps with performance, though, as running the CPU at
full speed as soon as we drop below the threshold (with hysteresis)
also means that we get back to running at the lowest frequency even
faster.

Johan

  parent reply	other threads:[~2024-06-25  7:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-22 12:26 [PATCH v1] thermal: gov_step_wise: Go straight to instance->lower when mitigation is over Rafael J. Wysocki
2024-06-24 18:43 ` Rafael J. Wysocki
2024-06-24 19:18 ` Steev Klimaszewski
2024-06-25  7:34 ` Johan Hovold [this message]
2024-06-25 12:33   ` Rafael J. Wysocki

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=ZnpzBuWbKxbrKvoR@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=jens.glathe@oldschoolsolutions.biz \
    --cc=johan+linaro@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=steev@kali.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