* Allow userspace do something special on overtemp
@ 2004-08-11 8:53 Pavel Machek
2004-08-11 9:03 ` Arjan van de Ven
` (3 more replies)
0 siblings, 4 replies; 25+ messages in thread
From: Pavel Machek @ 2004-08-11 8:53 UTC (permalink / raw)
To: trenn, seife, kernel list, Len Brown
Hi!
This patch cleans up thermal.c a bit, and adds possibility to react to
critical overtemp: it tries to call /sbin/overtemp, and only if that
fails calls /sbin/poweroff.
Could it be applied?
Pavel
--- tmp/linux/drivers/acpi/thermal.c 2004-08-11 10:47:04.000000000 +0200
+++ linux/drivers/acpi/thermal.c 2004-08-11 10:45:36.000000000 +0200
@@ -60,7 +60,6 @@
#define ACPI_THERMAL_NOTIFY_HOT 0xF1
#define ACPI_THERMAL_MODE_ACTIVE 0x00
#define ACPI_THERMAL_MODE_PASSIVE 0x01
-#define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff"
#define ACPI_THERMAL_MAX_ACTIVE 10
@@ -424,24 +423,25 @@
static int
-acpi_thermal_call_usermode (
- char *path)
+acpi_thermal_call_usermode(void)
{
char *argv[2] = {NULL, NULL};
char *envp[3] = {NULL, NULL, NULL};
ACPI_FUNCTION_TRACE("acpi_thermal_call_usermode");
- if (!path)
- return_VALUE(-EINVAL);
-
- argv[0] = path;
-
/* minimal command environment */
envp[0] = "HOME=/";
envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
-
- call_usermodehelper(argv[0], argv, envp, 0);
+
+ argv[0] = "/sbin/overtemp";
+ if (call_usermodehelper(argv[0], argv, envp, 0)) {
+ argv[0] = "/sbin/poweroff";
+ if (call_usermodehelper(argv[0], argv, envp, 0)) {
+ /* What to do here? Should we just cut the power? */
+ printk(KERN_CRIT "attempts to poweroff failed, please power me down manually\n");
+ }
+ }
return_VALUE(0);
}
@@ -483,7 +483,7 @@
printk(KERN_EMERG "Critical temperature reached (%ld C), shutting down.\n", KELVIN_TO_CELSIUS(tz->temperature));
acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_CRITICAL, tz->trips.critical.flags.enabled);
- acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);
+ acpi_thermal_call_usermode();
return_VALUE(0);
}
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 8:53 Allow userspace do something special on overtemp Pavel Machek
@ 2004-08-11 9:03 ` Arjan van de Ven
2004-08-11 9:06 ` Pavel Machek
2004-08-11 9:18 ` Måns Rullgård
[not found] ` <411A239C.8060606@blue-labs.org>
` (2 subsequent siblings)
3 siblings, 2 replies; 25+ messages in thread
From: Arjan van de Ven @ 2004-08-11 9:03 UTC (permalink / raw)
To: Pavel Machek; +Cc: trenn, seife, kernel list, Len Brown
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
On Wed, 2004-08-11 at 10:53, Pavel Machek wrote:
> Hi!
>
> This patch cleans up thermal.c a bit, and adds possibility to react to
> critical overtemp: it tries to call /sbin/overtemp, and only if that
> fails calls /sbin/poweroff.
why not call /sbin/hotplug ????
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 9:03 ` Arjan van de Ven
@ 2004-08-11 9:06 ` Pavel Machek
2004-08-11 14:49 ` Len Brown
2004-08-11 9:18 ` Måns Rullgård
1 sibling, 1 reply; 25+ messages in thread
From: Pavel Machek @ 2004-08-11 9:06 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: trenn, seife, kernel list, Len Brown
Hi!
> > This patch cleans up thermal.c a bit, and adds possibility to react to
> > critical overtemp: it tries to call /sbin/overtemp, and only if that
> > fails calls /sbin/poweroff.
>
> why not call /sbin/hotplug ????
Because /sbin/hotplug may exist, but may not know how to handle
overtemp. Which would be bad.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 9:03 ` Arjan van de Ven
2004-08-11 9:06 ` Pavel Machek
@ 2004-08-11 9:18 ` Måns Rullgård
2004-08-11 18:22 ` Olaf Hering
1 sibling, 1 reply; 25+ messages in thread
From: Måns Rullgård @ 2004-08-11 9:18 UTC (permalink / raw)
To: linux-kernel
Arjan van de Ven <arjanv@redhat.com> writes:
> On Wed, 2004-08-11 at 10:53, Pavel Machek wrote:
>> Hi!
>>
>> This patch cleans up thermal.c a bit, and adds possibility to react to
>> critical overtemp: it tries to call /sbin/overtemp, and only if that
>> fails calls /sbin/poweroff.
>
> why not call /sbin/hotplug ????
Good idea, then udev could create /dev/blowtorch so some other program
can do ioctl(SCSI_STOP) (or just run cdrecord dev=6,6,6 -eject).
Besides, it is called HOTplug for a reason.
Seriously, though, isn't hotplug supposed to handle plugging and
unplugging of hardware, rather than any random events detected by the
kernel?
--
Måns Rullgård
mru@kth.se
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 9:06 ` Pavel Machek
@ 2004-08-11 14:49 ` Len Brown
2004-08-11 14:52 ` Wichert Akkerman
` (2 more replies)
0 siblings, 3 replies; 25+ messages in thread
From: Len Brown @ 2004-08-11 14:49 UTC (permalink / raw)
To: Pavel Machek; +Cc: Arjan van de Ven, trenn, seife, Kernel Mailing List
On Wed, 2004-08-11 at 05:06, Pavel Machek wrote:
> Hi!
>
> > >.adds possibility to react to
> > > critical overtemp: it tries to call /sbin/overtemp, and only if
> that fails calls /sbin/poweroff.
Does /sbin/overtemp exist anyplace, or is this a proposal
to create it? What might it do?
thanks,
-Len
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 14:49 ` Len Brown
@ 2004-08-11 14:52 ` Wichert Akkerman
2004-08-11 15:28 ` Thomas Renninger
2004-08-11 20:26 ` Pavel Machek
2 siblings, 0 replies; 25+ messages in thread
From: Wichert Akkerman @ 2004-08-11 14:52 UTC (permalink / raw)
To: Kernel Mailing List
Previously Len Brown wrote:
> Does /sbin/overtemp exist anyplace, or is this a proposal
> to create it? What might it do?
Or why not use a netlink message for it?
Wichert.
--
Wichert Akkerman <wichert@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 14:49 ` Len Brown
2004-08-11 14:52 ` Wichert Akkerman
@ 2004-08-11 15:28 ` Thomas Renninger
2004-08-11 21:08 ` Kronos
2004-08-11 20:26 ` Pavel Machek
2 siblings, 1 reply; 25+ messages in thread
From: Thomas Renninger @ 2004-08-11 15:28 UTC (permalink / raw)
To: Len Brown; +Cc: Pavel Machek, Arjan van de Ven, seife, Kernel Mailing List
Len Brown wrote:
> On Wed, 2004-08-11 at 05:06, Pavel Machek wrote:
>
>>Hi!
>>
>>
>>>>.adds possibility to react to
>>>>critical overtemp: it tries to call /sbin/overtemp, and only if
>>
>>that fails calls /sbin/poweroff.
>
>
> Does /sbin/overtemp exist anyplace, or is this a proposal
> to create it? What might it do?
save some user info, suspend, standby, extreme throttling?
It should be somehow configurable in userspace.
For my opinion it would be nicest if kernel just throws a thermal event
to /proc/acpi/event (it already does this, but immediately shuts down)
and acpid or others should decide whether shutdown/suspend/standby or
whatever should be done next.
I have a machine with a broken DSDT which sets the critical tp to 200°C,
there always must be some HW shutdown..., or do you think this is too risky?
Some other related thing:
Why are no thermal events thrown if active/passive trip points are
reached/sub-ceeded?
The only way at the moment to figure out in userspace whether the system
is actively cooled or even slowed down by throttling (passive) is by
polling /proc/acpi/thermal/*/state. Isn't the purpose of thermal events
exactly for this?
I think about a possiblity to notify user if machine is slowed down.
Thomas
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 9:18 ` Måns Rullgård
@ 2004-08-11 18:22 ` Olaf Hering
0 siblings, 0 replies; 25+ messages in thread
From: Olaf Hering @ 2004-08-11 18:22 UTC (permalink / raw)
To: Måns Rullgård; +Cc: linux-kernel
On Wed, Aug 11, Måns Rullgård wrote:
> Seriously, though, isn't hotplug supposed to handle plugging and
> unplugging of hardware, rather than any random events detected by the
> kernel?
/sbin/kernel_event_notifier was named /sbin/hotplug by accident.
I'm sure someone will send a patch to fix it up.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
[not found] ` <411A239C.8060606@blue-labs.org>
@ 2004-08-11 20:22 ` Pavel Machek
0 siblings, 0 replies; 25+ messages in thread
From: Pavel Machek @ 2004-08-11 20:22 UTC (permalink / raw)
To: David Ford; +Cc: kernel list
Hi!
> Would you mind improving this slightly, instead of returning on
> failure, idle on failure so the cpu cools down from lack of
> instruction execution? Is this easily done?
Well, but that would kill the system, right?
I do not want to do that. Hardware will kill us anyway if
overheat is serious.
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 14:49 ` Len Brown
2004-08-11 14:52 ` Wichert Akkerman
2004-08-11 15:28 ` Thomas Renninger
@ 2004-08-11 20:26 ` Pavel Machek
2 siblings, 0 replies; 25+ messages in thread
From: Pavel Machek @ 2004-08-11 20:26 UTC (permalink / raw)
To: Len Brown
Cc: Pavel Machek, Arjan van de Ven, trenn, seife, Kernel Mailing List
Hi!
> > > >.adds possibility to react to
> > > > critical overtemp: it tries to call /sbin/overtemp, and only if
> > that fails calls /sbin/poweroff.
>
> Does /sbin/overtemp exist anyplace, or is this a proposal
> to create it? What might it do?
It does not exist anywhere, but probably will exist in SL92.
It might:
* shutdown faster (poweroff is very carefull but not too fast;
* display big red message "sorry your cpu overheated" then shutdown :-)
* do nothing (use with care if your thermal sensor is flakey)
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 15:28 ` Thomas Renninger
@ 2004-08-11 21:08 ` Kronos
0 siblings, 0 replies; 25+ messages in thread
From: Kronos @ 2004-08-11 21:08 UTC (permalink / raw)
To: linux-kernel; +Cc: Thomas Renninger, Pavel Machek, Arjan van de Ven
Thomas Renninger <trenn@suse.de> ha scritto:
> Len Brown wrote:
>> On Wed, 2004-08-11 at 05:06, Pavel Machek wrote:
>>
>>>Hi!
>>>
>>>
>>>>>.adds possibility to react to
>>>>>critical overtemp: it tries to call /sbin/overtemp, and only if
>>>
>>>that fails calls /sbin/poweroff.
>>
>>
>> Does /sbin/overtemp exist anyplace, or is this a proposal
>> to create it? What might it do?
>
> save some user info, suspend, standby, extreme throttling?
> It should be somehow configurable in userspace.
>
> For my opinion it would be nicest if kernel just throws a thermal event
> to /proc/acpi/event (it already does this, but immediately shuts down)
> and acpid or others should decide whether shutdown/suspend/standby or
> whatever should be done next.
I think that /sbin/overtemp is better, acpid may not know what do.
Suppose that the kernel delivers the event to acpid (or hotplug) but
they aren't configured to handle that, your CPU will melt...
> I have a machine with a broken DSDT which sets the critical tp to 200°C,
> there always must be some HW shutdown..., or do you think this is too risky?
It's more secure to call a program that can handle that for sure (ie.
/sbin/overtemp) and shutdown if it doesn't exist.
Luca
--
Home: http://kronoz.cjb.net
"New processes are created by other processes, just like new
humans. New humans are created by other humans, of course,
not by processes." -- Unix System Administration Handbook
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 8:53 Allow userspace do something special on overtemp Pavel Machek
2004-08-11 9:03 ` Arjan van de Ven
[not found] ` <411A239C.8060606@blue-labs.org>
@ 2004-08-12 0:08 ` Dax Kelson
2004-08-12 3:29 ` Len Brown
2004-08-12 7:35 ` Pavel Machek
2004-08-12 15:19 ` Len Brown
3 siblings, 2 replies; 25+ messages in thread
From: Dax Kelson @ 2004-08-12 0:08 UTC (permalink / raw)
To: Pavel Machek; +Cc: trenn, seife, kernel list, Len Brown
On Wed, 2004-08-11 at 02:53, Pavel Machek wrote:
> Hi!
>
> This patch cleans up thermal.c a bit, and adds possibility to react to
> critical overtemp: it tries to call /sbin/overtemp, and only if that
> fails calls /sbin/poweroff.
>
> Could it be applied?
> Pavel
Why invent Yet-Another-Call-To-Userland-Interface when either
hotplug/dbus, netlink or an ACPI event will do?
The argument "well what if hotplug of acpid don't know what to do" is,
IMO, bogus since:
* Obviously systems today are functioning
* Hardware will poweroff off on overheat anyway (not graceful, but will
save hardware components)
* Teaching hotplug/apcid isn't hard
* Policy should be kept out of the kernel if at all possible
Dax
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 0:08 ` Dax Kelson
@ 2004-08-12 3:29 ` Len Brown
2004-08-12 7:40 ` Pavel Machek
2004-08-12 7:35 ` Pavel Machek
1 sibling, 1 reply; 25+ messages in thread
From: Len Brown @ 2004-08-12 3:29 UTC (permalink / raw)
To: Dax Kelson; +Cc: Pavel Machek, trenn, seife, Kernel Mailing List
I agree with Dan.
I think I'd rather see the calls to usermode deleted
instead of extended -- unless there is a reason that
the general event -> acpid method can't work.
If the administrator screws up and disables shutdown
on critical temp, modern hardware will throttle
(in hardware), and if that too fails, it will shut
itself off.
-Len
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 0:08 ` Dax Kelson
2004-08-12 3:29 ` Len Brown
@ 2004-08-12 7:35 ` Pavel Machek
1 sibling, 0 replies; 25+ messages in thread
From: Pavel Machek @ 2004-08-12 7:35 UTC (permalink / raw)
To: Dax Kelson; +Cc: trenn, seife, kernel list, Len Brown
Hi!
> > This patch cleans up thermal.c a bit, and adds possibility to react to
> > critical overtemp: it tries to call /sbin/overtemp, and only if that
> > fails calls /sbin/poweroff.
> >
> > Could it be applied?
>
> Why invent Yet-Another-Call-To-Userland-Interface when either
> hotplug/dbus, netlink or an ACPI event will do?
>
> The argument "well what if hotplug of acpid don't know what to do" is,
> IMO, bogus since:
>
> * Obviously systems today are functioning
Yes, kernel is calling /sbin/poweroff, which everyone has. Switching
to hotplug/dbus would immediately break those systems.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 3:29 ` Len Brown
@ 2004-08-12 7:40 ` Pavel Machek
2004-08-12 14:28 ` Len Brown
0 siblings, 1 reply; 25+ messages in thread
From: Pavel Machek @ 2004-08-12 7:40 UTC (permalink / raw)
To: Len Brown; +Cc: Dax Kelson, trenn, seife, Kernel Mailing List
Hi!
> I think I'd rather see the calls to usermode deleted
> instead of extended -- unless there is a reason that
> the general event -> acpid method can't work.
See above, switching to acpid would break all the existing
setups... in stable series.
Also notice that thermal.c is so "interestingly" written that my patch
does not actually make it longer by deleting useless defines etc...
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 7:40 ` Pavel Machek
@ 2004-08-12 14:28 ` Len Brown
2004-08-12 20:24 ` Pavel Machek
0 siblings, 1 reply; 25+ messages in thread
From: Len Brown @ 2004-08-12 14:28 UTC (permalink / raw)
To: Pavel Machek; +Cc: Dax Kelson, trenn, seife, Kernel Mailing List
On Thu, 2004-08-12 at 03:40, Pavel Machek wrote:
> Hi!
>
> > I think I'd rather see the calls to usermode deleted
> > instead of extended -- unless there is a reason that
> > the general event -> acpid method can't work.
>
> See above, switching to acpid would break all the existing
> setups... in stable series.
ah, the price of progress.
I'm confident that the distros can figure out how to
update the (neglected) acpid scripts at the same time as
(or before) the kernel update.
If they can't, then ACPI critical shutdown will fail
(maybe on some systems not such a bad thing;-)
and TM1 will kick in, and if that doesn't work, TM2
will kick in, and if that doesn't work the processor
will disable itself.
In practice, the only time this will happen is due to
an erroneous thermal sensor reading, or when somebody
loses their CPU fan; and it is the exact same path
that the system would take if somebody booted with acpi=off.
> Also notice that thermal.c is so "interestingly" written that my patch
> does not actually make it longer by deleting useless defines etc...
Conserving syntax is certainly laudable,
but conserving semantics is even more valuable.
I do thank you for identifying this issue and
proposing change.
-Len
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 15:19 ` Len Brown
@ 2004-08-12 15:16 ` Randy.Dunlap
2004-08-12 15:50 ` Stefan Seyfried
2004-08-12 17:27 ` [ACPI] " Stefan Dösinger
1 sibling, 1 reply; 25+ messages in thread
From: Randy.Dunlap @ 2004-08-12 15:16 UTC (permalink / raw)
To: Len Brown; +Cc: pavel, trenn, seife, linux-kernel, acpi-devel
On 12 Aug 2004 11:19:05 -0400 Len Brown wrote:
| Simpler to delete the usermode call and rely on the (flexible)
| acpid event, yes?
|
| thermal.c | 29 +----------------------------
| 1 files changed, 1 insertion(+), 28 deletions(-)
a. Yes, it should be more flexible than just 'overtemp'.
b. For userspace, there are:
acpid - http://sourceforge.net/projects/acpid/
acpi tools, like ospmd (by Andy Grover) - in CVS at
http://sourceforge.net/projects/acpi/
What others are there?
And ospmd (at least) needs some care. Andy wanted to give it up
1 or 2 years ago, so I took it over for awhile. However, it
still needs more care, so if anyone out there wants to maintain it,
please speak up.
--
~Randy
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-11 8:53 Allow userspace do something special on overtemp Pavel Machek
` (2 preceding siblings ...)
2004-08-12 0:08 ` Dax Kelson
@ 2004-08-12 15:19 ` Len Brown
2004-08-12 15:16 ` Randy.Dunlap
2004-08-12 17:27 ` [ACPI] " Stefan Dösinger
3 siblings, 2 replies; 25+ messages in thread
From: Len Brown @ 2004-08-12 15:19 UTC (permalink / raw)
To: Pavel Machek; +Cc: trenn, seife, Kernel Mailing List, ACPI Developers
Simpler to delete the usermode call and rely on the (flexible)
acpid event, yes?
thermal.c | 29 +----------------------------
1 files changed, 1 insertion(+), 28 deletions(-)
cheers,
-Len
===== drivers/acpi/thermal.c 1.34 vs edited =====
--- 1.34/drivers/acpi/thermal.c Thu Jul 8 01:56:01 2004
+++ edited/drivers/acpi/thermal.c Thu Aug 12 11:13:59 2004
@@ -61,7 +61,6 @@
#define ACPI_THERMAL_MODE_ACTIVE 0x00
#define ACPI_THERMAL_MODE_PASSIVE 0x01
#define ACPI_THERMAL_MODE_CRT 0xff
-#define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff"
#define ACPI_THERMAL_MAX_ACTIVE 10
@@ -422,30 +421,6 @@
static int
-acpi_thermal_call_usermode (
- char *path)
-{
- char *argv[2] = {NULL, NULL};
- char *envp[3] = {NULL, NULL, NULL};
-
- ACPI_FUNCTION_TRACE("acpi_thermal_call_usermode");
-
- if (!path)
- return_VALUE(-EINVAL);
-
- argv[0] = path;
-
- /* minimal command environment */
- envp[0] = "HOME=/";
- envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
-
- call_usermodehelper(argv[0], argv, envp, 0);
-
- return_VALUE(0);
-}
-
-
-static int
acpi_thermal_critical (
struct acpi_thermal *tz)
{
@@ -468,10 +443,8 @@
if (result)
return_VALUE(result);
- printk(KERN_EMERG "Critical temperature reached (%ld C), shutting
down.\n", KELVIN_TO_CELSIUS(tz->temperature));
+ printk(KERN_EMERG "Critical temperature reached (%ld C).\n",
KELVIN_TO_CELSIUS(tz->temperature));
acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_CRITICAL,
tz->trips.critical.flags.enabled);
-
- acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);
return_VALUE(0);
}
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 15:16 ` Randy.Dunlap
@ 2004-08-12 15:50 ` Stefan Seyfried
0 siblings, 0 replies; 25+ messages in thread
From: Stefan Seyfried @ 2004-08-12 15:50 UTC (permalink / raw)
To: Randy.Dunlap
Cc: Len Brown, Pavel Machek, Thomas Renninger, linux-kernel,
acpi-devel
Randy.Dunlap wrote:
> On 12 Aug 2004 11:19:05 -0400 Len Brown wrote:
>
> | Simpler to delete the usermode call and rely on the (flexible)
> | acpid event, yes?
> |
> | thermal.c | 29 +----------------------------
> | 1 files changed, 1 insertion(+), 28 deletions(-)
>
> a. Yes, it should be more flexible than just 'overtemp'.
>
> b. For userspace, there are:
>
> acpid - http://sourceforge.net/projects/acpid/
>
> acpi tools, like ospmd (by Andy Grover) - in CVS at
> http://sourceforge.net/projects/acpi/
>
> What others are there?
powersaved - http://forge.novell.com/modules/xfmod/project/?powersave
handles APM, ACPI and cpufreq
--
seife
"Any ideas, John?"
"Well, surrounding thems out."
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [ACPI] Re: Allow userspace do something special on overtemp
2004-08-12 15:19 ` Len Brown
2004-08-12 15:16 ` Randy.Dunlap
@ 2004-08-12 17:27 ` Stefan Dösinger
2004-08-12 22:53 ` Len Brown
1 sibling, 1 reply; 25+ messages in thread
From: Stefan Dösinger @ 2004-08-12 17:27 UTC (permalink / raw)
To: acpi-devel; +Cc: Len Brown, Pavel Machek, trenn, seife, Kernel Mailing List
Hi,
Isn't this a little bit dangerous? What if acpid is not set up to handle this?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 14:28 ` Len Brown
@ 2004-08-12 20:24 ` Pavel Machek
2004-08-12 22:51 ` Len Brown
0 siblings, 1 reply; 25+ messages in thread
From: Pavel Machek @ 2004-08-12 20:24 UTC (permalink / raw)
To: Len Brown; +Cc: Dax Kelson, trenn, seife, Kernel Mailing List
Hi!
> > > I think I'd rather see the calls to usermode deleted
> > > instead of extended -- unless there is a reason that
> > > the general event -> acpid method can't work.
> >
> > See above, switching to acpid would break all the existing
> > setups... in stable series.
>
> ah, the price of progress.
>
> I'm confident that the distros can figure out how to
> update the (neglected) acpid scripts at the same time as
> (or before) the kernel update.
* not everyone is running distro
* people update their kernels more often then their distros
* not everyone wants to run acpid or equivalent (I don't, for example)
* it is still change in stable series.
* it is pretty subtle change, you are not going to notice it is broken
unless you actually run critical.
> If they can't, then ACPI critical shutdown will fail
> (maybe on some systems not such a bad thing;-)
> and TM1 will kick in, and if that doesn't work, TM2
> will kick in, and if that doesn't work the processor
> will disable itself.
hmm, yes, but it still would be nice to properly shutdown instead of
fail.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 20:24 ` Pavel Machek
@ 2004-08-12 22:51 ` Len Brown
2004-08-12 23:21 ` Pavel Machek
0 siblings, 1 reply; 25+ messages in thread
From: Len Brown @ 2004-08-12 22:51 UTC (permalink / raw)
To: Pavel Machek; +Cc: Dax Kelson, trenn, seife, Kernel Mailing List
On Thu, 2004-08-12 at 16:24, Pavel Machek wrote:
> Hi!
>
> > > > I think I'd rather see the calls to usermode deleted
> > > > instead of extended -- unless there is a reason that
> > > > the general event -> acpid method can't work.
> > >
> > > See above, switching to acpid would break all the existing
> > > setups... in stable series.
> >
> > ah, the price of progress.
> >
> > I'm confident that the distros can figure out how to
> > update the (neglected) acpid scripts at the same time as
> > (or before) the kernel update.
>
> * not everyone is running distro
>
> * people update their kernels more often then their distros
>
> * not everyone wants to run acpid or equivalent (I don't, for example)
>
> * it is still change in stable series.
> * it is pretty subtle change, you are not going to notice it is broken
> unless you actually run critical.
>
> > If they can't, then ACPI critical shutdown will fail
> > (maybe on some systems not such a bad thing;-)
> > and TM1 will kick in, and if that doesn't work, TM2
> > will kick in, and if that doesn't work the processor
> > will disable itself.
>
> hmm, yes, but it still would be nice to properly shutdown instead of
> fail.
The reality is that most of the critical temperature events
are false positives, and for those that are not, the hardware
will keep itself from burning even when the OS control fails.
If we confuse some self-supporting kernel types, that is too bad.
If they're supporting themselves, they should read the change logs
for the kernels that they download. I don't think
this is of a magnitude that it needs to wait for 2.7 to be fixed.
-Len
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [ACPI] Re: Allow userspace do something special on overtemp
2004-08-12 17:27 ` [ACPI] " Stefan Dösinger
@ 2004-08-12 22:53 ` Len Brown
0 siblings, 0 replies; 25+ messages in thread
From: Len Brown @ 2004-08-12 22:53 UTC (permalink / raw)
To: stefandoesinger
Cc: ACPI Developers, Pavel Machek, trenn, seife, Kernel Mailing List
On Thu, 2004-08-12 at 13:27, Stefan Dösinger wrote:
> Hi,
> Isn't this a little bit dangerous? What if acpid is not set up to
> handle this?
>
There are two levels of hardware thermal control that will
kick in -- TM1 and TM2, and if they fail the hardware will
turn itself off. Speaking for Intel processors only.
The reason is that the hardware needs to handle this case
where the OS crashes while in ACPI mode and is unable
to do any thermal control itself.
cheers,
-Len
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
2004-08-12 22:51 ` Len Brown
@ 2004-08-12 23:21 ` Pavel Machek
0 siblings, 0 replies; 25+ messages in thread
From: Pavel Machek @ 2004-08-12 23:21 UTC (permalink / raw)
To: Len Brown; +Cc: Dax Kelson, trenn, seife, Kernel Mailing List
Hi!
> > hmm, yes, but it still would be nice to properly shutdown instead of
> > fail.
>
> The reality is that most of the critical temperature events
> are false positives, and for those that are not, the hardware
> will keep itself from burning even when the OS control fails.
>
> If we confuse some self-supporting kernel types, that is too bad.
> If they're supporting themselves, they should read the change logs
> for the kernels that they download. I don't think
> this is of a magnitude that it needs to wait for 2.7 to be fixed.
There's nothing to fix. It is not broken. It just does /sbin/poweroff;
that's correct.
/sbin/poweroff is there on almost all systems; that is not case with
acpid. Currently *noone* has acpid that handles critical properly,
right?
So I believe that change is bad idea. /sbin/overtemp lets user
configure it etc.
Ouch and btw I've done some torturing on one prototype (AMD). It had
thermal at 98Celsius (specs for this cpu said 95C max), and I ended my
test at 105Celsius. I do not know about TM1/TM2 etc, but in this case
hardware clearly failed to do the right thing.
I do not know why acpid should be involved in this. execing binary
seems safer to me -- acpid might have died (OOM? segfault?), and exec
does not strike me like too ugly.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Allow userspace do something special on overtemp
[not found] ` <fa.g1p407b.1c569pj@ifi.uio.no>
@ 2004-08-13 4:22 ` Robert Hancock
0 siblings, 0 replies; 25+ messages in thread
From: Robert Hancock @ 2004-08-13 4:22 UTC (permalink / raw)
To: linux-kernel
----- Original Message -----
From: "Pavel Machek" <pavel@suse.cz>
Newsgroups: fa.linux.kernel
To: "Len Brown" <len.brown@intel.com>
Cc: "Dax Kelson" <dax@gurulabs.com>; <trenn@suse.de>; <seife@suse.de>;
"Kernel Mailing List" <linux-kernel@vger.kernel.org>
Sent: Thursday, August 12, 2004 5:25 PM
Subject: Re: Allow userspace do something special on overtemp
> Ouch and btw I've done some torturing on one prototype (AMD). It had
> thermal at 98Celsius (specs for this cpu said 95C max), and I ended my
> test at 105Celsius. I do not know about TM1/TM2 etc, but in this case
> hardware clearly failed to do the right thing.
This is dependent on the CPU/motherboard in use - AMD CPUs (up to the last
ones I heard about, anyway) don't have any built in thermal protection, they
rely on the motherboard to shut down the CPU in the event of
over-temperature. Intel CPUs since the Pentium II all shut down on excessive
over-temperature; Pentium 4s will also clock-throttle to continue operating
before they get to this point.
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2004-08-13 4:28 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-11 8:53 Allow userspace do something special on overtemp Pavel Machek
2004-08-11 9:03 ` Arjan van de Ven
2004-08-11 9:06 ` Pavel Machek
2004-08-11 14:49 ` Len Brown
2004-08-11 14:52 ` Wichert Akkerman
2004-08-11 15:28 ` Thomas Renninger
2004-08-11 21:08 ` Kronos
2004-08-11 20:26 ` Pavel Machek
2004-08-11 9:18 ` Måns Rullgård
2004-08-11 18:22 ` Olaf Hering
[not found] ` <411A239C.8060606@blue-labs.org>
2004-08-11 20:22 ` Pavel Machek
2004-08-12 0:08 ` Dax Kelson
2004-08-12 3:29 ` Len Brown
2004-08-12 7:40 ` Pavel Machek
2004-08-12 14:28 ` Len Brown
2004-08-12 20:24 ` Pavel Machek
2004-08-12 22:51 ` Len Brown
2004-08-12 23:21 ` Pavel Machek
2004-08-12 7:35 ` Pavel Machek
2004-08-12 15:19 ` Len Brown
2004-08-12 15:16 ` Randy.Dunlap
2004-08-12 15:50 ` Stefan Seyfried
2004-08-12 17:27 ` [ACPI] " Stefan Dösinger
2004-08-12 22:53 ` Len Brown
[not found] <fa.fd8nc62.oig6ao@ifi.uio.no>
[not found] ` <fa.g1p407b.1c569pj@ifi.uio.no>
2004-08-13 4:22 ` Robert Hancock
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).