tech-userlevel archive

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

Re: Some powerd(8) defaults



On Sun, May 15, 2011 at 08:15:20PM -0400, Matthew Mondor wrote:
> My opinion here is that cron(8) should always run

The rationale here was that some services like cron(8) are so heavy that
these will have a direct impact on power consumption. This will be even
more prevalent once we have C-states for x86, i.e. the issue is not logging
but load once cron(8) runs. Again, maybe there could be an option to start/stop
daemons/services upon receiving certain events, defaulting to "off".

(Logging itself is another question; I would recommend mounting the whole
/var/log as tmpfs on battery-powered systems.)

> No objection, SIGPWD should probably still be issued as per Bellovin's
> suggestion; I'm not sure if the kernel should take care of this, the
> general shutdown scripts or powerd scripts.

Preferably this kind of thing should be both in the shutdown and the powerd(8)
scripts. In other words, the general approach should be to push the
inevitable complexity of power management policies away from the kernel --
which presumably was also the rationale of an userspace daemon.

Generally, Bellovin's idea of "application integrity" is interesting, but
probably quite difficult to achieve within NetBSD (unlike, say, Apple); we
have no control over most of the applications, and even the required heavy
patching of our local applications is probably not worth the trouble, IMO.
But if something wants to catch SIGPWR, sure, why not.

> I have a question relating to this: would this leave as-is any current
> user setting?  I would not care if 25% dimming could automatically
> occur (optionally, of course) on low battery or non-AC situation, but
> would expect that to be 25% of the current setting, rather than 75% of
> the total brightness possible.  Replugging the cord would restore it to
> the previous setting rather than at 100% brightness.

Sounds reasonable.

- Jukka.


Home | Main Index | Thread Index | Old Index