Subject: Re: New power management framework for sysmon
To: Steven M. Bellovin <smb@research.att.com>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: current-users
Date: 04/20/2003 11:16:09
On Sunday, April 20, 2003, at 11:04  AM, Steven M. Bellovin wrote:

> I confess that that scares me.  If user level gets wedged -- to pick
> three plausible situations, if powerd depends on threads, which are
> a bit buggy right now, or if powerd is waiting forever for some other
> script to complete (apmd seems to have that problem), or if the disk
> controller is hung, making it impossible to read the fan control script
> -- you could easily end up with a fried CPU.  Are there any safety 
> mechanisms?

First of all, powerd(8) is a REALLY REALLY simple application.  No 
threads, and it uses scripts to do all the "hard work".  The most 
interesting thing powerd(8) does it use kqueue(2).

Secondly, the kernel should provide the safest defaults.  I.e. an ACPI 
system should power up with the fans running full-tilt, and then let 
powerd(8) adjust the fan speed to save power when it starts up.  (This 
has not been implemented in powerd(8) yet; I'm just saying how it 
should work :-)

Thirdly, if the kernel detects the temperature is about to go critical, 
it should override whatever powerd(8)'s policy is.  Firmware on some 
systems does this for you already (temp gets too high, shuts the power 
off for you).

         -- Jason R. Thorpe <thorpej@wasabisystems.com>