Re: [RFC] Shutdown on thermal HOT event if no userspace tool registered being able to do S4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas, 

於 二,2010-03-30 於 17:31 +0100,Thomas Renninger 提到:
> On Tuesday 30 March 2010 18:12:40 Joey Lee wrote:
> > Hi Thomas, 
> > 
> > 於 二,2010-03-30 於 10:23 +0100,Thomas Renninger 提到:
> > > Hi,
> ...
> > > Comments?
> > > What userspace tools are candidates to implement this if this
> > > makes sense?
> > > 
> > 
> > HAL + pm-util or DeviceKit-power might the candidates. But, if there
> > have no those component in userland, what will acpi thermal module do?
> > Direct shutdown?
> > And, how can kernel space know userland can do this job well? Might wait
> > 10 seconds if system doesn't S4 or shutdown?
> Yep, my idea is to e.g. provide:
> /sys/class/thermal/S4_capable
> By default you get:
> cat /sys/class/thermal/S4_capable
> 0
> and the thermal driver will call the same shutdown method
> if the hot thermal tp is reached as if the critical is reached.
> 
> If pm-utils does:
> echo 1 >/sys/class/thermal/S4_capable
> it has to make sure it picks up acpi thermal hot event and initiates
> S4. If S4 fails for whatever reasons (no swap,
> stroking some kernel drivers fails, unmounting file systems fails, ...),
> it has to make sure to force a system shutdown (just call /sbin/poweroff
> the same way the kernel does currently with a critical thermal event?).
> Emergency shutdown is then out of kernels hand (as it is currently for HOT
> anyway which is dangerous).
> 
> Hmm, this is acpi specific, possibly it should be a new dir here:
> /sys/firmware/acpi/thermal/S4_capable
> or something else?
> 

Your idea looks good to me, but, the DeviceKit-power will rename to
upower, and Kay is the udev expert.
I think will need kay's professional comment on udev side.


Hi Kay, 

We are discussing about how to handle the situtation if BIOS ACPI didn't
return the _CRT value, and even have _HOT value, if S4 fail, what can we
do on kernel space and userland.

_CRT value is the shutdown critical temperature
_HOT value is the critical temperature for sleep (entry to S4)

Per ACPI spec:
The platform vendor should define _HOT to be far enough below _CRT so as
to allow OSPM enough time to transition the system into the S4 sleeping
state.

Currently, there have a bit platform provider (OEM/ODM) only return the
_HOT, but didn't have _CRT value. But, if _HOT S4 fail, the system
components might dangerous if there have no any hardware protected
Mechanism.

Thomas's idea is add a sysfs interface /sys/class/thermal/S4_capable for
userland to tell kernel userland component (pm-util or upower?) already
take the _HOT event and try to do S4.

How do you think about this idea?


Thank's
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux