From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755516AbZBTXQT (ORCPT ); Fri, 20 Feb 2009 18:16:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753100AbZBTXQM (ORCPT ); Fri, 20 Feb 2009 18:16:12 -0500 Received: from smtp-out002.kontent.com ([81.88.40.216]:37414 "EHLO smtp-out002.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190AbZBTXQL convert rfc822-to-8bit (ORCPT ); Fri, 20 Feb 2009 18:16:11 -0500 From: Oliver Neukum To: Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= Subject: Re: [RFD] Automatic suspend Date: Sat, 21 Feb 2009 00:20:43 +0100 User-Agent: KMail/1.10.3 (Linux/2.6.27.7-9-default; KDE/4.1.3; x86_64; ; ) Cc: "Rafael J. Wysocki" , Alan Stern , "Woodruff, Richard" , Arjan van de Ven , Kyle Moffett , Benjamin Herrenschmidt , pm list , LKML , Pavel Machek , Nigel Cunningham , Matthew Garrett , mark gross , Uli Luckas , Igor Stoppa , Brian Swetland , Len Brown References: <200902202305.09992.oliver@neukum.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200902210020.47665.oliver@neukum.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Samstag 21 Februar 2009 00:11:28 schrieb Arve Hjønnevåg: > On Fri, Feb 20, 2009 at 2:05 PM, Oliver Neukum wrote: > > Am Freitag 20 Februar 2009 11:46:55 schrieb Rafael J. Wysocki: > >> On Thursday 19 February 2009, Oliver Neukum wrote: > > With the set of runnable processes.There's always a window between > > evaluating the current set of runnable tasks and telling the kernel to > > sleep. IMO the most elegant solution would be a task attribute that would > > signal the kernel that a task should not count as keeping the system busy > > even if it is runnable and trigger the sleep in kernel space. > > It is not always safe to enter suspend when no tasks are runnable. For > instance, a key event could be on a user space queue, but the code > that reads from that queue has been paged out. In that case you'd have a task waiting for IO. The driver should refuse to suspend or wake up the system as IO is completed. It may be inefficient to suspend for such a presumably short time, but it is not a correctness issue. Regards Oliver