From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758949AbZBRXFE (ORCPT ); Wed, 18 Feb 2009 18:05:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755247AbZBRXEt (ORCPT ); Wed, 18 Feb 2009 18:04:49 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:44578 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756203AbZBRXEs convert rfc822-to-8bit (ORCPT ); Wed, 18 Feb 2009 18:04:48 -0500 From: "Rafael J. Wysocki" To: Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= Subject: Re: [RFD] Automatic suspend Date: Thu, 19 Feb 2009 00:04:17 +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: <200902182217.48321.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: <200902190004.18878.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 18 February 2009, Arve Hjønnevåg wrote: > On Wed, Feb 18, 2009 at 1:17 PM, Rafael J. Wysocki wrote: > > On Wednesday 18 February 2009, Arve Hjønnevåg wrote: > >> On Tue, Feb 17, 2009 at 3:21 PM, Rafael J. Wysocki wrote: > >> > On Tuesday 17 February 2009, Alan Stern wrote: > > >> >> Kernel wakelocks are a separate matter. They are more like a form of > >> >> optimization, preventing the kernel from starting an auto-suspend when > >> >> some driver knows beforehand that it will return -EBUSY. > >> > > >> > I think kernel-side autosuspend (or rather autosleep) should only happen > >> > after certain subset of devices have been suspended using a per-device > >> > run-time autosuspend mechanism. > >> > >> When the last wakelock is released the task that we woke up to perform > >> has finished. Why wait to re-enter suspend. > > > > I don't really understand this comment. Could you please explain a bit? > > If some devices are autosuspended after a local inactivity timeout, I > don't want to wait for those devices to autosuspend if I know the code > that needed to run is done. This could cause delays in the normal > case, Isn't it a matter of adjusting the inactivity timeouts in a suitable way? > and it could prevent suspend if a background process (not using > wakelocks) is accessing a disk more frequently than its idle timeout. Well, actually, shouldn't it prevent suspend from happening? Arguably, it just means that the disk is continuously being accessed with respect to the inactive timeout granularity. Rafael