netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Petr Machata <petrm@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, "Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Ido Schimmel <idosch@nvidia.com>,
	Vadim Pasternak <vadimp@nvidia.com>,
	mlxsw@nvidia.com
Subject: Re: [PATCH net-next 1/3] mlxsw: core_thermal: Use static trip points for transceiver modules
Date: Sun, 2 Apr 2023 13:28:27 +0200	[thread overview]
Message-ID: <ZClm2zFHD6ZGVVVD@corigine.com> (raw)
In-Reply-To: <051bffde8a638410eea98ac51cb3a429e0130889.1680272119.git.petrm@nvidia.com>

On Fri, Mar 31, 2023 at 04:17:30PM +0200, Petr Machata wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> The driver registers a thermal zone for each transceiver module and
> tries to set the trip point temperatures according to the thresholds
> read from the transceiver. If a threshold cannot be read or if a
> transceiver is unplugged, the trip point temperature is set to zero,
> which means that it is disabled as far as the thermal subsystem is
> concerned.
> 
> A recent change in the thermal core made it so that such trip points are
> no longer marked as disabled, which lead the thermal subsystem to
> incorrectly set the associated cooling devices to the their maximum
> state [1]. A fix to restore this behavior was merged in commit
> f1b80a3878b2 ("thermal: core: Restore behavior regarding invalid trip
> points"). However, the thermal maintainer suggested to not rely on this
> behavior and instead always register a valid array of trip points [2].
> 
> Therefore, create a static array of trip points with sane defaults
> (suggested by Vadim) and register it with the thermal zone of each
> transceiver module. User space can choose to override these defaults
> using the thermal zone sysfs interface since these files are writeable.
> 
> Before:
> 
>  $ cat /sys/class/thermal/thermal_zone11/type
>  mlxsw-module11
>  $ cat /sys/class/thermal/thermal_zone11/trip_point_*_temp
>  65000
>  75000
>  80000
> 
> After:
> 
>  $ cat /sys/class/thermal/thermal_zone11/type
>  mlxsw-module11
>  $ cat /sys/class/thermal/thermal_zone11/trip_point_*_temp
>  55000
>  65000
>  80000
> 
> Also tested by reverting commit f1b80a3878b2 ("thermal: core: Restore
> behavior regarding invalid trip points") and making sure that the
> associated cooling devices are not set to their maximum state.
> 
> [1] https://lore.kernel.org/linux-pm/ZA3CFNhU4AbtsP4G@shredder/
> [2] https://lore.kernel.org/linux-pm/f78e6b70-a963-c0ca-a4b2-0d4c6aeef1fb@linaro.org/
> 
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
> Signed-off-by: Petr Machata <petrm@nvidia.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


  parent reply	other threads:[~2023-04-02 11:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 14:17 [PATCH net-next 0/3] mlxsw: Use static trip points for transceiver modules Petr Machata
2023-03-31 14:17 ` [PATCH net-next 1/3] mlxsw: core_thermal: " Petr Machata
2023-04-01 20:28   ` Daniel Lezcano
2023-04-02 11:28   ` Simon Horman [this message]
2023-03-31 14:17 ` [PATCH net-next 2/3] mlxsw: core_thermal: Make mlxsw_thermal_module_init() void Petr Machata
2023-04-02 11:28   ` Simon Horman
2023-03-31 14:17 ` [PATCH net-next 3/3] mlxsw: core_thermal: Simplify transceiver module get_temp() callback Petr Machata
2023-04-02 11:29   ` Simon Horman
2023-04-02 12:50 ` [PATCH net-next 0/3] mlxsw: Use static trip points for transceiver modules patchwork-bot+netdevbpf

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=ZClm2zFHD6ZGVVVD@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=rafael@kernel.org \
    --cc=vadimp@nvidia.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;
as well as URLs for NNTP newsgroup(s).