Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755143AbZCCNz1 (ORCPT ); Tue, 3 Mar 2009 08:55:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750946AbZCCNzQ (ORCPT ); Tue, 3 Mar 2009 08:55:16 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:40251 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbZCCNzP (ORCPT ); Tue, 3 Mar 2009 08:55:15 -0500 Date: Tue, 3 Mar 2009 14:57:50 +0100 From: Pavel Machek To: Arve Hj?nnev?g Cc: "Rafael J. Wysocki" , Alan Stern , "Woodruff, Richard" , Arjan van de Ven , Kyle Moffett , Oliver Neukum , 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: <20090303135750.GC5060@elf.ucw.cz> References: <200902192215.18365.rjw@sisk.pl> <200902272155.42010.rjw@sisk.pl> <200902281118.14595.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Content-Length: 1025 Lines: 27 Hi! > >> If you ignore wakelocks with timeouts, the current > >> wakelock interface can be implemented with a global atomic_t to > >> prevent suspend, and a per wakelock atomic_t to prevent a single > >> client from changing the global reference count by more than one. > >> > >> There are a couple of reasons that I have not done this. It removes > >> the ability to easily inspect the system when it is not suspending. > > > > Care to elaborate? > > If you have a single atomic_t and it is not 0, you do not know who > incremented it. Which is okay for already debugged system. For debugging, yes some support can be nice. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- 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/