From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758814Ab0EZJdg (ORCPT ); Wed, 26 May 2010 05:33:36 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:53368 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754129Ab0EZJde convert rfc822-to-8bit (ORCPT ); Wed, 26 May 2010 05:33:34 -0400 Subject: Re: [PATCH 1/8] PM: Opportunistic suspend support. From: Peter Zijlstra To: Florian Mickler Cc: Arve =?ISO-8859-1?Q?Hj=F8nnev=E5g?= , "Rafael J. Wysocki" , Alan Stern , Dmitry Torokhov , Linux-pm mailing list , Kernel development list , Len Brown , Pavel Machek , Randy Dunlap , Andrew Morton , Andi Kleen , Cornelia Huck , Tejun Heo , Jesse Barnes , Nigel Cunningham , Ming Lei , Wu Fengguang , Maxim Levitsky , linux-doc@vger.kernel.org, Matthew Garrett , Greg KH , tytso@mit.edu, James Bottomley In-Reply-To: <20100526112303.3fef15a4@schatten.dmk.lab> References: <201005252344.37639.rjw@sisk.pl> <1274863342.5882.4850.camel@twins> <20100526112303.3fef15a4@schatten.dmk.lab> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Wed, 26 May 2010 11:33:22 +0200 Message-ID: <1274866402.5882.5051.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2010-05-26 at 11:23 +0200, Florian Mickler wrote: > There is polling, because the suspend manager in userspace doesn't have > the whole picture. i.e. it doesn't know if a suspend will be > successfull. > So for aggressive suspending as a powersave-feature you need to poll > (i.e. retry upon failure). because you don't want to stay unsuspended. Clearly if it fails, there something to be done, right? So whoever does the thing will communicate with the suspend manager that it's going to do and has finished doing its thing, at which point it will try again. That's event driven, not polled. Also, if you want you can keep the kernel-side auto-suspend side, and have the suspend manager clear on !0 and re-establish the auto-suspend state on 0. But you really don't need this device thingy.