A single power preference knob
Posted Jun 24, 2010 13:05 UTC (Thu) by
Tobu (subscriber, #24111)
In reply to:
A single power preference knob by TRS-80
Parent article:
A single power preference knob
I agree that the kernel shouldn't contain complex policy, and should give ultimate control over policy to userland. But apparently the settings to tweak range wide and userland is missing some.
This master knob could provide a default value for settings that have yet to be tweaked by userland. When switching modes, the userland tweaks the master knob, then whatever knobs it is aware of. The problem with this is that most driver settings don't have an unset, please fall back to the default value. As a consequence, with the current proposal the default value can only be read by drivers that don't expose settings to userland yet. To be effective with existing, exposed settings, the master trigger would have to trigger changes to every one of them, and that's not something that should be done in-kernel.
Other solutions to the breadth of settings would be:
- an annotation mechanism that lists the knobs and a documentation tool that checks every knob appears in the Documentation directory;
- blessing one of the userland tools and requiring kernel drivers to update the tool as well;
- an introspection mechanism that lists the knobs, their range, and a default value for at least two power modes.
I like the introspection approach myself, since it will lead to better userland tools. Those tools should be able to discover and tweak settings they don't know about, and expose them to the user. It would also provide a good platform for experimenting with a watt meter.
(
Log in to post comments)