Source-Changes-D archive

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

Re: CVS commit: src/etc/powerd/scripts

On 31.12.2010 11:10, Jukka Ruohonen wrote:
> On Fri, Dec 31, 2010 at 11:01:08AM +0100, Jean-Yves Migeon wrote:
>> I am using machdep.sleep_state as node to put a domU into suspend mode.
>> Up to now, putting sleep_state under machdep allowed powerd(8)
>> sleep_button to be used regardless of the environment (eg. ACPI sleep or
>> Xen domU sleep).
> So Xen uses a *machine-dependent* sysctl(8) variable for purposes entirely
> different from the intended one?

machine-dependent: yes
for purposes entirely different from the intended one: not really,
purpose is arguably the same, put system into "sleep" ("sleep" state
being not well defined, I admit).

It's only in my local tree though. This can be done in entirely
different ways, nothing is set in stone.

The side effect of your change is that the sleep_state node will move
under hw.acpi, which is not right in Xen domU case.

>> While retiring sleep_state from machdep goes in the right direction
>> IMHO, will it be replaced by a MI interface to put a system into sleep,
>> as it is not a feature specific to ACPI?
> Definitely agreed. Maybe we could steal zzz(8) from APM?

Seems reasonable to me. We could have a more featureful binary later,
and just alias zzz(8) to it.

> Generally, most of the problems ("the mess") in the area of power management
> have been directly caused by the lack of proper MI interfaces and the overall
> lack of planning. The move towards sysmon_pswitch(9), pmf(9), and powerd(8)
> were a step to the right direction; the mistakes done with the i386-specific
> apm(4) should not be repeated.

Of course not; that's why I am asking.

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index