Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632Ab0FHBNl (ORCPT ); Mon, 7 Jun 2010 21:13:41 -0400 Received: from netrider.rowland.org ([192.131.102.5]:42388 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752051Ab0FHBNk (ORCPT ); Mon, 7 Jun 2010 21:13:40 -0400 Date: Mon, 7 Jun 2010 21:13:39 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= cc: Matthew Garrett , Vitaly Wool , Neil Brown , , Peter Zijlstra , Brian Swetland , Felipe Balbi , LKML , Florian Mickler , James Bottomley , Thomas Gleixner , "H. Peter Anvin" , Linux PM , Linux OMAP Mailing List , Linus Torvalds , Ingo Molnar , Alan Cox , Arjan van de Ven Subject: Re: [linux-pm] suspend blockers & Android integration In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1642 Lines: 37 On Mon, 7 Jun 2010, Arve Hj?nnev?g wrote: > > Remember that suspend takes place in several phases, the first of which > > is to freeze tasks. ?The phases can be controlled individually by the > > process carrying out a suspend, and there's nothing to prevent you from > > stopping after the freezer phase. ?Devices won't get powered down, but > > Android uses aggressive runtime power management for its devices > > anyway. > > > > If you do this then the synchronization can be carried out entirely > > from userspace, with no need for kernel modifications such as suspend > > blockers. And since Android can reach essentially the same low-power > > state from idle as from suspend, it appears that they really don't need > > any kernel changes at all. > > > > I don't think this is true. If you stop after the freezer phase you > still need all the suspend blockers that are held until user-space > consumes an event, otherwise it never gets consumed since user-space > is frozen. No. You don't need to hold any suspend blockers; you merely need to unfreeze userspace. Once it is unfrozen, it will eventually consume the wakeup event. What you _do_ need to do is to prevent userspace from getting frozen again too soon. That's the purpose of the list of "active" wakeup sources. So long as the power manager believes a source is still active, it won't freeze anything. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/