Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755584AbZCCXwS (ORCPT ); Tue, 3 Mar 2009 18:52:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754025AbZCCXwB (ORCPT ); Tue, 3 Mar 2009 18:52:01 -0500 Received: from qw-out-2122.google.com ([74.125.92.25]:3405 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302AbZCCXwA convert rfc822-to-8bit (ORCPT ); Tue, 3 Mar 2009 18:52:00 -0500 MIME-Version: 1.0 In-Reply-To: <20090303135750.GC5060@elf.ucw.cz> References: <200902192215.18365.rjw@sisk.pl> <200902272155.42010.rjw@sisk.pl> <200902281118.14595.rjw@sisk.pl> <20090303135750.GC5060@elf.ucw.cz> Date: Tue, 3 Mar 2009 15:51:58 -0800 Message-ID: Subject: Re: [RFD] Automatic suspend From: =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= To: Pavel Machek 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 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: 1588 Lines: 37 On Tue, Mar 3, 2009 at 5:57 AM, Pavel Machek wrote: > 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. Yes, but installing an app can turn your debugged system into an undebugged system. I think is fine to have a kernel option to disable all debugging support, I just don't think it is the top priority. I have two options for making the no-stats no-timeout configuration faster. Option one, always use a reference count, and implement the other configurations on top of this. This makes the shipping configuration slower. Option two, use a completely separate implementation when stats or timeouts are enabled. This makes the fast version virtually untested. Neither of these are very appealing at the moment. -- Arve Hj?nnev?g -- 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/