[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CF2F38D4AE21BB4CB845318E4C5ECB6731CC866A@shsmsx501.ccr.corp.intel.com>
Date: Wed, 26 Jan 2011 15:14:16 +0800
From: "Zhang, Rui" <rui.zhang@...el.com>
To: Henrique de Moraes Holschuh <hmh@....eng.br>,
Thomas Renninger <trenn@...e.de>
CC: "R, Durgadoss" <durgadoss.r@...el.com>,
"jdelvare@...ell.com" <jdelvare@...ell.com>,
Len Brown <lenb@...nel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
Kay Sievers <kay.sievers@...y.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-trace-users@...r.kernel.org"
<linux-trace-users@...r.kernel.org>
Subject: RE: Thermal kernel events API to userspace - Was: Re: thermal:
Avoid CONFIG_NET compile dependency
> -----Original Message-----
> From: Henrique de Moraes Holschuh [mailto:hmh@....eng.br]
> Sent: Wednesday, January 26, 2011 12:11 AM
> To: Thomas Renninger
> Cc: Zhang, Rui; R, Durgadoss; jdelvare@...ell.com; Len Brown; linux-
> acpi@...r.kernel.org; Kay Sievers; linux-perf-users@...r.kernel.org;
> linux-kernel@...r.kernel.org; linux-trace-users@...r.kernel.org
> Subject: Re: Thermal kernel events API to userspace - Was: Re: thermal:
> Avoid CONFIG_NET compile dependency
> Importance: High
>
> On Tue, 25 Jan 2011, Thomas Renninger wrote:
> > > > Please give us at least two levels of thermal alarm: critical and
> emergency
> > > > (or warning and critical -- it doesn't matter much, as long as
> there are at
> > > > least two levels, and which one comes first is defined by the
> > > > specification). I'd have immediate use for them on thinkpads.
> > What kind of thinkpad specific events are these and what actions
> > should be taken if they happen?
>
> So far: Battery temperature critical and emergency, Generic system
> sensor
> temperature critical and emergency.
>
> In all cases, the recommended actions are imediate notification for the
> user, and in the case of the emergency level, immediate action, where
> action
> is "suspend to ram" or shutdown.
>
> Right now all they do is to prinkt at suitable "horrible things are
> about to
> happen" severity levels (KERN_CRIT for critical, and KERN_ALERT for
> emergency). In a few sensible desktop environments and distros, this
> causes
> a notification to show up on the user's screen.
>
> Oh, and it also relays the thinkpad-specific event through the ACPI
> event
> pipe, but I don't know of any userspace application doing something
> with it,
> and nobody ever tried to bribe me into writing one by suppling me with
> a new
> T-series thinkpad :)
>
> > I wonder which events would need userspace to take specific
> > (configured) actions at all and what kind of action it could be.
>
> All of them can have sensible generic actions. See my other email.
>
> > What is THERMAL_USER_AUX0?
> > When will it get thrown and what is userspace expected to do?
>
> Good question. What use are those "user defined" events in a generic
> interface, anyway? You will have to know exactly what device is
> issuing the
> "generic user defined" event, and what it means for that device.
>
> When you need a device-specific interface, you design one that is well
> defined, such as thinkpad-acpi's thinkpad-specific "acpi" events. If
> you
> get any thinkpad-acpi specific event, you know exactly what it is, and
> nothing else ever issues those events, so you will never get them from
> somewhere else with a different meaning.
>
I think you are talking about something like this:
enum events {
/* generic thermal event */
THERMAL_WARN,
THERMAL_EMERG,
THERMAL_CRIT,
/* coretemp thermal events */
TEHRMAL_CT_AUX0,
TEHRMAL_CT_AUX1,
/* Thinkpad battery thermal events */
THERMAL_TP_BAT_CRIT,
THERMAL_TP_BAT_EMERG,
THERMAL_DEV_FAULT,
};
Right?
> --
> "One disk to rule them all, One disk to find them. One disk to bring
> them all and in the darkness grind them. In the Land of Redmond
> where the shadows lie." -- The Silicon Valley Tarot
> Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists