netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Vadim Pasternak <vadimp@mellanox.com>,
	linux-pm@vger.kernel.org, netdev@vger.kernel.org,
	rui.zhang@intel.com, edubezval@gmail.com, jiri@resnulli.us
Subject: Re: [patch net-next RFC 03/12] mlxsw: core: Add core environment module for port temperature reading
Date: Tue, 26 Jun 2018 10:00:12 -0700	[thread overview]
Message-ID: <20180626170012.GA28370@roeck-us.net> (raw)
In-Reply-To: <20180626142238.GB5064@lunn.ch>

On Tue, Jun 26, 2018 at 04:22:38PM +0200, Andrew Lunn wrote:
> On Tue, Jun 26, 2018 at 12:10:28PM +0000, Vadim Pasternak wrote:
> 
> Adding the linux-pm@vger.kernel.org list.
> 
> > Add new core_env module to allow port temperature reading. This
> > information has most critical impact on system's thermal monitoring and
> > is to be used by core_hwmon and core_thermal modules.
> > 
> > New internal API reads the temperature from all the modules, which are
> > equipped with the thermal sensor and exposes temperature according to
> > the worst measure. All individual temperature values are normalized to
> > pre-defined range.
> 
> This patchset has been sent to the netdev list before. I raised a few
> questions about this, which is why it is now being posted to a bigger
> group for review.
> 
> The hardware has up to 64 temperature sensors. These sensors are
> hot-plugable, since they are inside SFP modules, which are
> hot-plugable. Different SFP modules can have different operating
> temperature ranges. They contain an EEPROM which lists upper and lower
> warning and fail temperatures, and report alarms when these thresholds
> a reached.
> 
> This code takes the 64 sensors readings and calculates a single value
> it passes to one thermal zone. That thermal zone then controls one fan
> to keep this single value in range.
> 
> I queried is this is the correct way to do this? Would it not be
> better to have up to 64 thermal zones? Leave the thermal core to
> iterate over all the zones in order to determine how the fan should be
> driven?
> 
I very much think so. This problem must exist elsewhere; essentially
it is the bundling of multiple temperature sensors into a single thermal
zone. I am not sure if this should be 64 thermal zones or one thermal
zone with up to 64 sensors and some algorithm to select the relevant
temperature; that would be up to the thermal subsystem maintainers
to decide. Either case, the sensors should be handled and reported
as individual sensors, with appropriate limits, not as single sensor.
Yes, I understand that means we'll have hundreds of hwmon devices,
but that should not be a problem (and if it is, we'll have to fix
the problem, not the code exposing it).

I understand that the thermal subsystem does not currently support
handling this problem. There may also be some missing pieces between
the hwmon and thermal subsystems, such as reporting limits or alarms
when a hwmon driver register with the thermal subsystem.

Maybe it is time to add this support as part of this patch series ?

> This is possibly the first board with so many sensors. However, i
> doubt it is totally unique. Other big Ethernet switches with lots of
> SFP modules may be added later. Also, 10G copper PHYs often have
> temperature sensors, so this is not limited to just boards with
> optical ports. So having a generic solution would be good.

Agreed.

Thanks,
Guenter

> 
> What do the Linux PM exports say about this?
> 
> Thanks
> 	Andrew

  reply	other threads:[~2018-06-26 17:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 12:10 [patch net-next RFC 00/12] mlxsw thermal monitoring amendments Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 01/12] mlxsw: spectrum: Move QSFP EEPROM defenitons to common location Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 02/12] mlxsw: reg: Add MTBR register Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 03/12] mlxsw: core: Add core environment module for port temperature reading Vadim Pasternak
2018-06-26 14:22   ` Andrew Lunn
2018-06-26 17:00     ` Guenter Roeck [this message]
2018-06-26 17:50       ` Vadim Pasternak
2018-06-26 18:18         ` Andrew Lunn
2018-06-26 19:01           ` Vadim Pasternak
2018-06-26 19:35             ` Andrew Lunn
2018-06-26 12:10 ` [patch net-next RFC 04/12] mlxsw: core: Add bus frequency capability flag for the bus type Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 05/12] mlxsw: core: Set different thermal polling time based on " Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 06/12] mlxsw: core: Modify thermal zone definition Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 07/12] mlxsw: core: Extend thermal zone operations with get_trend method Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 08/12] mlxsw: core: Extend cooling device with cooling levels Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 09/12] mlxsw: core: Rename cooling device Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 10/12] mlxsw: core: Add ports temperature measurement to thermal algorithm Vadim Pasternak
2018-06-26 12:10 ` [patch net-next RFC 11/12] mlxsw: core: Extend hwmon interface with FAN fault attribute Vadim Pasternak
2018-06-26 14:28   ` Andrew Lunn
2018-06-26 14:47     ` Vadim Pasternak
2018-06-26 16:32       ` Guenter Roeck
2018-06-26 16:47         ` Vadim Pasternak
2018-06-26 18:32           ` Guenter Roeck
2018-06-26 12:10 ` [patch net-next RFC 12/12] mlxsw: core: Extend hwmon interface with port temperature attributes Vadim Pasternak

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=20180626170012.GA28370@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=andrew@lunn.ch \
    --cc=edubezval@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=linux-pm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=vadimp@mellanox.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).