Re: Run-time PM idea (was: Re: [linux-pm] [RFC][PATCH 0/2] PM:Rearrange core suspend code)

From: Matthew Garrett
Date: Mon Jun 08 2009 - 10:30:41 EST


On Mon, Jun 08, 2009 at 04:21:54PM +0200, Ingo Molnar wrote:

> The kernel _needs_ to have precise information about whether a piece
> of hardware is in use or not.

The kernel can only have that information if userspace tells it. What
we're quibbling over is whether the kernel should be explicitly told
about the requirement (ie, every time an app makes a key grab in X the
kernel gets told about it) or whether it should be implicit (userspace
knows that a key grab has been made and so requests that the keyboard
not be suspended).

We *can* put all of that complexity in the kernel. The question is
whether it buys us anything. We'd have to modify huge chunks of
userspace and in the process we'd end up limited to whatever policy
happens to exist in the version of the kernel the user is running.

I'd like the kernel to expose this functionality but leave the policy
decisions to userland.

--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/