From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757118AbZB0KOI (ORCPT ); Fri, 27 Feb 2009 05:14:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751634AbZB0KNz (ORCPT ); Fri, 27 Feb 2009 05:13:55 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:35507 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbZB0KNy (ORCPT ); Fri, 27 Feb 2009 05:13:54 -0500 Date: Fri, 27 Feb 2009 11:16:32 +0100 From: Pavel Machek To: "Rafael J. Wysocki" Cc: Alan Stern , Oliver Neukum , Arve Hj?nnev?g , "Woodruff, Richard" , Arjan van de Ven , Kyle Moffett , Benjamin Herrenschmidt , pm list , LKML , Nigel Cunningham , Matthew Garrett , mark gross , Uli Luckas , Igor Stoppa , Brian Swetland , Len Brown Subject: Re: [RFD] Automatic suspend Message-ID: <20090227101632.GG4582@elf.ucw.cz> References: <200902212214.59660.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902212214.59660.rjw@sisk.pl> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > To summarize, we can: > * Use a refcount such that automatic suspend will only be possible if it's > equal to zero (but that need not be the only criterion). > * Use a per-device flag in dev_pm_info that will be set whenever the device > driver increases the refcount and unset whenever the driver decreases the > refcount. > * Use a per-process flag that will be set whenever the process increases the > refcount and unset whenever the process decreases the refcount. Yes, that sounds sane, and that's how reasonable wakelock implementation should look like. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html