From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757505AbZBTKuX (ORCPT ); Fri, 20 Feb 2009 05:50:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751665AbZBTKuI (ORCPT ); Fri, 20 Feb 2009 05:50:08 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:54063 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751536AbZBTKuH convert rfc822-to-8bit (ORCPT ); Fri, 20 Feb 2009 05:50:07 -0500 From: "Rafael J. Wysocki" To: Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= Subject: Re: [RFD] Automatic suspend Date: Fri, 20 Feb 2009 11:49:36 +0100 User-Agent: KMail/1.11.0 (Linux/2.6.29-rc5-tst; KDE/4.2.0; x86_64; ; ) Cc: Alan Stern , "Woodruff, Richard" , Arjan van de Ven , Kyle Moffett , Oliver Neukum , Benjamin Herrenschmidt , pm list , LKML , Pavel Machek , Nigel Cunningham , Matthew Garrett , mark gross , Uli Luckas , Igor Stoppa , Brian Swetland , Len Brown References: <200902192215.18365.rjw@sisk.pl> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200902201149.37921.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 20 February 2009, Arve Hjønnevåg wrote: > On Thu, Feb 19, 2009 at 2:08 PM, Alan Stern wrote: > >> > It might have to be platform-specific. The Android people seem to have a > >> > pretty good idea of what criteria will work for them. > >> > >> I'd really like to know in what situations Androind is supposed to suspend > >> automatically. > > > > It might be better to ask in what situations Android is _not_ supposed > > to sleep automatically. In other words, in what situations is a > > wakelock acquired? Since the whole system is only a phone, this > > question should have a reasonably well-defined answer. > > On an android phone, any code that needs to run when the screen is off > must hold a wakelock (directly or indirectly). In general if an > application or the system is processing an event that may cause a user > notification (new email, incoming phone call, alarm, etc.) it needs to > prevent suspend. But, we also use wakelocks to upload stats or > download system updates in the background, and for media player or > (gps) data logging applications. All of this doesn't seem to require wakelocks acuired from kernel space. What do you need those wakelocks for? Rafael