From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Garrett Subject: Re: Run-time PM idea (was: Re: [RFC][PATCH 0/2] PM: Rearrange core suspend code) Date: Mon, 8 Jun 2009 15:30:23 +0100 Message-ID: <20090608143023.GA16752__22924.0168155686$1244471480$gmane$org@srcf.ucam.org> References: <20090608131159.GA15100@srcf.ucam.org> <20090608132235.GC13214@elte.hu> <200906081539.20459.oliver@neukum.org> <20090608142154.GD14234@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20090608142154.GD14234@elte.hu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Ingo Molnar Cc: LKML , ACPI Devel Maling List , pm list List-Id: linux-pm@vger.kernel.org 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@srcf.ucam.org