From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCHv4 1/1] Hwmon: Add core/pkg Threshold
Date: Sat, 17 Sep 2011 17:36:02 +0000 [thread overview]
Message-ID: <20110917173602.GA21288@ericsson.com> (raw)
In-Reply-To: <1310468836-5517-1-git-send-email-durgadoss.r@intel.com>
On Sat, Sep 17, 2011 at 01:23:27PM -0400, R, Durgadoss wrote:
> Hi Guenter,
>
> [snip..]
> > > It was just a suggestion from me that we can handle the interrupts from
> > > within therm_throt since there was code in there, doing this already.
> > > I did not know (in fact do not know..) how to catch these interrupts
> > > inside coretemp. That's why I thought of adding code in therm_throt.
> > >
> > > If it's not the right way to go, I am open to other ideas.
> > >
> > > On the other hand, I am fine with the idea of having tempX_threshold[0-7]
> > > and their alarms. We can use the 'status' bits in the THERM_STATUS
> > > register to represent the alarm. The logic can be something like this:
> > >
> > > //Log bits indicate the input temperature reached the configured threshold;
> > > //but we do not know from which direction.
> > > if (msr_val & THERM_LOG_THRESHOLD0) {
> > > //if the status bit is one, the input temperature is higher than the
> > > //configured threshold. If it is zero, the input temperature is lower
> > > //than the configured threshold.
> > > bool alarm = msr_val & THERM_STATUS_THRESHOLD0;
> > > print: alarm
> > > //Let the user space take care of 0/1 from the *_alarm interfaces.
> > > }
> > >
> > So there is a clear notion of "exceed" associated with those thresholds ?
>
> Sorry Guenter. I don't get what you mean by this :-(
>
How about "It is known that the temperature is at or above the threshold" ?
> > I thought there was just an interrupt whenever the threshold is reached
> > from either side. Looks like I missed that one.
> >
> > Personally, I don't think "alarm" would be appropriate here, since we don't
> > know if the threshold is supposed to be a lower or an upper limit, and if
> > it reflects an alarm to start with. If we define a new set of attributes for
> > unspecified thresholds, I would prefer something like
> > "tempX_thresholdY_triggered".
> >
>
> For me, it looks like, we need not know whether the threshold is upper or lower.
> Anyway, for every threshold, we will get two interrupts (for either direction)
> So, the user space can assume either a lower threshold and look for 0 in the
> Corresponding alarm interface Or a higher threshold and look for 1 in the
> alarm interface. Will this not work ?
>
For a lower threshold, "alarm" implies "temperature is at or below threshold",
In other words, "alarm" can mean that a value is above or below a given threshold -
it has a semantics that depends on its context.
This context is not known in the case of a generic threshold. This is why I suggested
to use a more neutral term, such as "triggered", which would imply "at or above
threshold" (or possibly just "threshold triggered" if the direction is not known)
without attaching a semantics to it.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-09-17 17:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 5:45 [lm-sensors] [PATCHv4 1/1] Hwmon: Add core/pkg Threshold Support to Durgadoss R
2011-07-13 20:48 ` [lm-sensors] [PATCHv4 1/1] Hwmon: Add core/pkg Threshold Guenter Roeck
2011-09-12 16:18 ` Jean Delvare
2011-09-12 17:13 ` Guenter Roeck
2011-09-12 18:44 ` Jean Delvare
2011-09-13 9:34 ` R, Durgadoss
2011-09-13 12:55 ` Guenter Roeck
2011-09-13 13:40 ` R, Durgadoss
2011-09-13 13:45 ` Guenter Roeck
2011-09-13 14:13 ` Jean Delvare
2011-09-13 15:11 ` Jean Delvare
2011-09-13 15:20 ` Guenter Roeck
2011-09-16 17:00 ` Jean Delvare
2011-09-16 17:48 ` Guenter Roeck
2011-09-16 19:21 ` Jean Delvare
2011-09-16 19:40 ` Guenter Roeck
2011-09-17 5:52 ` R, Durgadoss
2011-09-17 10:12 ` Guenter Roeck
2011-09-17 10:20 ` Jean Delvare
2011-09-17 12:00 ` Jean Delvare
2011-09-17 16:09 ` Guenter Roeck
2011-09-17 16:31 ` Guenter Roeck
2011-09-17 17:08 ` Guenter Roeck
2011-09-17 17:10 ` R, Durgadoss
2011-09-17 17:35 ` R, Durgadoss
2011-09-17 17:36 ` Guenter Roeck [this message]
2011-09-17 17:52 ` R, Durgadoss
2011-09-17 18:09 ` Guenter Roeck
2011-09-18 13:30 ` Jean Delvare
2011-09-18 16:46 ` Guenter Roeck
2011-09-18 17:24 ` Jean Delvare
2011-09-18 19:54 ` Jean Delvare
2011-09-18 19:59 ` Jean Delvare
2011-09-18 20:04 ` Jean Delvare
2011-09-19 17:23 ` Guenter Roeck
2011-09-20 3:39 ` R, Durgadoss
2011-09-20 4:03 ` Guenter Roeck
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=20110917173602.GA21288@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.