Re: FCNewInit and power management

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

 



Callum Lerwick wrote:

Run levels are states the system can be in. In addition to the existing
"halt" "reboot" "single user" "no network" and "normal" states, there is
"on battery" and "suspended" states just begging to be added. (I'm not
sure the best way to handle slightly different types of similar states.
We could possibly have a "battery low" state and we have "standby"
"suspend to ram" and "suspend to disk" to choose from. Do they full run
levels of their own? I'm guessing not...)

One trouble is that the real state of the system is really the direct product of a few different states, unioned with a few states that are 'special'

{network, no network} [x] { wallplug power, battery normal, battery low, ... } +
{halt, reboot, suspend, single user}

so the configuration system ought to reflect this, rather than expanding into tens or hundreds of 'runlevels' as new substates get added. The kind of thinking above would be the beginning of it... You can define the set of states as a union of sets, these sets can be a list of states or be a direct product of a union of sets against another union of sets.
The system I envision goes something like this. apmd and acpid get
stripped down so all they do is send events to init. init absorbs
similar functionality to acpid, it takes in "events" (over dbus?) from
apmd, acpid, UPS daemons, /usr/bin/poweroff, etc and evaluates rules
(Run scripts like acpid does?) that decide what states to switch to
based on these events. Switching states is then handled much like the
existing SysV init always has, or however the future system decides to
do so.

   This could be nice.

I'm actually not so sure about where the decision making needs to be,
but the main point is the state switching/tracking should all be done by
init, because thats what its for. Currently, there's a lot of
duplication in the handling of state changes, in apmd, acpid, hibernate,
laptop-mode, etc, that really needs to be centralized.

Comments?
   Some people have thought about applying logic programming ideas to init:

http://www-128.ibm.com/developerworks/linux/library/l-boot.html?ca=dgr-lnxw04BootFaster

Overall I'm skeptical about power management in laptops, I've yet to own one where the cure is worse than the disease... After NiIMH batteries age for a while, the 'low battery' indication seems to be unreliable: my experience is that it either comes 30 seconds before the system fails or it comes an hour early. With a reliable file system like ext3, I just run it into the ground. Because I do all my work in emacs, I never lose more than a minute of work.

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux