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:08:42 +0000 [thread overview]
Message-ID: <20110917170842.GA21048@ericsson.com> (raw)
In-Reply-To: <1310468836-5517-1-git-send-email-durgadoss.r@intel.com>
On Sat, Sep 17, 2011 at 12:58:40PM -0400, R, Durgadoss wrote:
> Hi Guenter/Jean,
>
> [snip..]
> > > But anyway, the current state of the coretemp driver is simply not
> > > good, so we have to do something. Short of a better proposal, I'd say
> > > yes, let's go with tempX_threshold[0-7] and their associated alarms.
> > >
> > Alarms is tricky. Keep in mind that those thresholds are non-directional and
> > trigger each time the temperature is reached, from above or from below.
> > Unless relationship between the threshold is well defined, such as with
> > <hyst, max> as we tried before, an "alarm" attribute on a single threshold
> > does not have a well defined meaning. An attribute named "triggered"
> > or similar might make more sense - something that causes a notification
> > if triggered and auto-resets after being read.
> >
> > Still, with Durgadoss' other email, I am not sure I like where this is going.
> > I thought the idea was to trigger interrupts which would result in a
> > notification
> > on the alarm attribute. As it is, it looks like the idea is to have the
> > interrupts handled by arch/x86/kernel/cpu/mcheck/therm_throt.c. If so,
> > I think it might be better to handle thresholds completely in the thermal
> > throttling code.
> >
>
> 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 ?
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".
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:08 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 [this message]
2011-09-17 17:10 ` R, Durgadoss
2011-09-17 17:35 ` R, Durgadoss
2011-09-17 17:36 ` Guenter Roeck
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=20110917170842.GA21048@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.