public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Serge Belyshev <belyshev@depni.sinp.msu.ru>,
	linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org
Subject: Re: [PATCH v3] k10temp: temperature sensor for AMD Family 10h/11h CPUs
Date: Wed, 25 Nov 2009 10:51:38 +0100	[thread overview]
Message-ID: <4B0CFE2A.6010008@ladisch.de> (raw)
In-Reply-To: <20091124211134.12971937@hyperion.delvare>

Jean Delvare wrote:
> On Tue, 24 Nov 2009 15:09:57 +0100, Clemens Ladisch wrote:
> > This means that one of the already existing limit values must be the
> > reference base, so we'd need just a mechanism to specify which of them
> > is it, i.e., "temp1_relative_base: max".  If we'd have
> > "temp1_relative: 70000", the application would have to search among the
> > limit values for one with the same value.
> 
> I fail to see why the application would care about this at all. When in
> relative mode, all other values would be offset by the temp#_relative
> value. But that value itself would not be displayed (it has no physical
> value, otherwise we wouldn't be in absolute mode, would we?)
> ...
> 
> > temp1_relative: true
> 
> This is taking flexibility away from us, for no benefit that I can see.
> Am I missing something?

The application has to display something like "24 °C below the limit",
so how should it know that the 70°C should be named "the limit"?

To use an example, my CPU has these entries like these:
temp1_input: 29875
temp1_max: 70000
temp1_crit: 95000
temp1_crit_hyst: 92500

How should these entries be displayed?
(we know that: "40.1 °C below limit", "limit", "25 °C above limit" etc.)

But what algorithm should the application (or libsensors) use to create
those labels?  If we have "temp1_relative: 70000", then this happens to
be the "max" limit; but what if some CPU vendor decides to define, e.g.,
the value 0 as the "normal" operating temperatire, so that the entries
would look like this:
temp1_input: -1000
temp1_max: 40000
temp1_relative: 0
Should the values be labeled as "1 °C below normal" and "40 °C above
normal", and how should the application know that 0 is to be labeled
"normal"?  It might make more sense to display the temperature just as
"41 °C below max", in which case the actual value of temp1_relative is
not used at all.

"Relative" means that any value is meaningful only in comparison with
other values/limits, so it does not make sense to declare one point on
the scale as base.

> Additionally it wouldn't fit in libsensors as it exists today.

Then the best bet would probably be an entry like temp#_unit, with
0 = absolute °C (default); 1 = relative °C or °K; other values
"unknown".  Even if some silly scale is introduced later, applications
that read this entry then know that they must not display a unit like °C
for unknown unit specifications.


Best regards,
Clemens

  reply	other threads:[~2009-11-25  9:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4AF91F70.10106@ladisch.de>
2009-11-20  8:15 ` [PATCH] k10temp: temperature sensor for AMD Family 10h/11h CPUs Clemens Ladisch
2009-11-20 10:22   ` Serge Belyshev
2009-11-20 10:44     ` [lm-sensors] " Jean Delvare
2009-11-20 10:47     ` [PATCH v2] " Clemens Ladisch
2009-11-20 11:30       ` [lm-sensors] " Jean Delvare
2009-11-20 11:56         ` Clemens Ladisch
2009-11-20 12:18           ` Jean Delvare
2009-11-23  7:45             ` [PATCH v3] " Clemens Ladisch
2009-11-23 13:51               ` Jean Delvare
2009-11-23 15:29                 ` Clemens Ladisch
2009-11-23 19:05                   ` Jean Delvare
2009-11-24  8:43                     ` Clemens Ladisch
2009-11-24 13:26                       ` Jean Delvare
2009-11-24 14:09                         ` Clemens Ladisch
2009-11-24 20:11                           ` Jean Delvare
2009-11-25  9:51                             ` Clemens Ladisch [this message]
2009-11-26 20:44                               ` Jean Delvare
2009-11-27 13:03                                 ` Clemens Ladisch
2010-01-10 14:45                                   ` Jean Delvare
2010-01-15  9:57                                     ` Clemens Ladisch
2010-01-15 13:31                                       ` Jean Delvare
2009-11-24  8:43                     ` [PATCH v4] " Clemens Ladisch
2009-11-25 19:45                       ` Andrew Morton
2009-11-26  7:46                         ` Clemens Ladisch
2009-11-27 15:43                       ` Jean Delvare
2009-11-28  7:48                         ` Andrew Morton

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=4B0CFE2A.6010008@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=belyshev@depni.sinp.msu.ru \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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