public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: [PATCH v3] thermal: core: Call monitor_thermal_zone() if zone temperature is invalid
Date: Sun, 14 Jul 2024 21:45:27 -0700	[thread overview]
Message-ID: <20240715044527.GA1544@sol.localdomain> (raw)
In-Reply-To: <6064157.lOV4Wx5bFT@rjwysocki.net>

Hello,

On Thu, Jul 04, 2024 at 01:46:26PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Commit 202aa0d4bb53 ("thermal: core: Do not call handle_thermal_trip()
> if zone temperature is invalid") caused __thermal_zone_device_update()
> to return early if the current thermal zone temperature was invalid.
> 
> This was done to avoid running handle_thermal_trip() and governor
> callbacks in that case which led to confusion.  However, it went too
> far because monitor_thermal_zone() still needs to be called even when
> the zone temperature is invalid to ensure that it will be updated
> eventually in case thermal polling is enabled and the driver has no
> other means to notify the core of zone temperature changes (for example,
> it does not register an interrupt handler or ACPI notifier).
> 
> Also if the .set_trips() zone callback is expected to set up monitoring
> interrupts for a thermal zone, it needs to be provided with valid
> boundaries and that can only be done if the zone temperature is known.
> 
> Accordingly, to ensure that __thermal_zone_device_update() will
> run again after a failing zone temperature check, make it call
> monitor_thermal_zone() regardless of whether or not the zone
> temperature is valid and make the latter schedule a thermal zone
> temperature update if the zone temperature is invalid even if
> polling is not enabled for the thermal zone (however, if this
> continues to fail, give up after some time).
> 
> Fixes: 202aa0d4bb53 ("thermal: core: Do not call handle_thermal_trip() if zone temperature is invalid")
> Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Link: https://lore.kernel.org/linux-pm/dc1e6cba-352b-4c78-93b5-94dd033fca16@linaro.org
> Link: https://lore.kernel.org/linux-pm/2764814.mvXUDI8C0e@rjwysocki.net
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

On v6.10 I'm seeing the following messages spammed to the kernel log endlessly,
and reverting this commit fixes it.

    [  156.410567] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  156.666583] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  156.922598] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  157.178613] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  157.434636] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  157.690774] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  157.946659] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  158.202717] thermal thermal_zone0: failed to read out thermal zone (-61)
    [  158.458697] thermal thermal_zone0: failed to read out thermal zone (-61)

/sys/class/thermal/thermal_zone0/type contains "iwlwifi_1".

- Eric

  parent reply	other threads:[~2024-07-15  4:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04 11:46 [PATCH v3] thermal: core: Call monitor_thermal_zone() if zone temperature is invalid Rafael J. Wysocki
2024-07-04 12:49 ` Daniel Lezcano
2024-07-04 12:52   ` Neil Armstrong
2024-07-04 14:23     ` Rafael J. Wysocki
2024-07-04 14:21   ` Rafael J. Wysocki
2024-07-04 16:53     ` Daniel Lezcano
2024-07-04 16:58       ` Rafael J. Wysocki
2024-07-15  4:45 ` Eric Biggers [this message]
2024-07-15  9:06   ` Stefan Lippers-Hollmann
2024-07-15 10:52     ` Rafael J. Wysocki
2024-07-15  9:09   ` Daniel Lezcano
2024-07-15 11:21     ` Rafael J. Wysocki
2024-07-15 12:54       ` Stefan Lippers-Hollmann
2024-07-15 14:48         ` Rafael J. Wysocki
2024-07-15 21:12           ` Eric Biggers
2024-07-15 23:48           ` Stefan Lippers-Hollmann
2024-07-16 10:05             ` Rafael J. Wysocki
2024-07-16 10:55               ` Stefan Lippers-Hollmann
2024-07-16 11:15                 ` Stefan Lippers-Hollmann
2024-07-16 11:36                   ` Rafael J. Wysocki
2024-07-16 12:10                     ` Daniel Lezcano
2024-07-16 12:18                       ` Rafael J. Wysocki
2024-07-16 12:30                     ` Rafael J. Wysocki
2024-07-16 13:20                       ` Stefan Lippers-Hollmann
2024-07-16 14:04                         ` Rafael J. Wysocki
2024-07-16 16:37                           ` Oleksandr Natalenko
2024-07-16 17:03                             ` Rafael J. Wysocki
2024-07-16 23:30                           ` Stefan Lippers-Hollmann
2024-07-16 11:19                 ` Rafael J. Wysocki
2024-07-15 10:49   ` 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=20240715044527.GA1544@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.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