From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754600Ab0ETJ05 (ORCPT ); Thu, 20 May 2010 05:26:57 -0400 Received: from ist.d-labs.de ([213.239.218.44]:43623 "EHLO mx01.d-labs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752098Ab0ETJ0z (ORCPT ); Thu, 20 May 2010 05:26:55 -0400 X-Greylist: delayed 929 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 May 2010 05:26:55 EDT Date: Thu, 20 May 2010 11:26:42 +0200 From: Florian Mickler To: Pavel Machek Newsgroups: gmane.linux.kernel,gmane.linux.documentation Cc: Arve Hj??nnev??g , linux-pm@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Randy Dunlap , Andrew Morton , Andi Kleen , Cornelia Huck , Tejun Heo , Jesse Barnes , Magnus Damm , Nigel Cunningham , Alan Stern , Ming Lei , Wu Fengguang , Maxim Levitsky , linux-doc@vger.kernel.org Subject: Re: [PATCH 1/8] PM: Add suspend block api. Message-ID: <20100520112642.74d93d26@schatten.dmk.lab> In-Reply-To: <20100520111111.333beb73@schatten.dmk.lab> References: <1273810273-3039-1-git-send-email-arve@android.com> <1273810273-3039-2-git-send-email-arve@android.com> <20100518131111.GB1563@ucw.cz> <20100520111111.333beb73@schatten.dmk.lab> X-Newsreader: Claws Mail 3.7.6 (GTK+ 2.18.9; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 May 2010 11:11:11 +0200 Florian Mickler wrote: > On Tue, 18 May 2010 15:11:11 +0200 > Pavel Machek wrote: > > > On Thu 2010-05-13 21:11:06, Arve Hj??nnev??g wrote: > > > Adds /sys/power/policy that selects the behaviour of /sys/power/state. > > > After setting the policy to opportunistic, writes to /sys/power/state > > > become non-blocking requests that specify which suspend state to > > > enter > > > > Yeah, one file selects behavior of another file, and to read available > > states for opportunistic, you have to write to file first. > > > > I still don't like the interface. > > > > Actually, what would be a better interface? > > I wonder why it is not like this: > > /sys/power/state > no change, works with and without opportunistic suspend the > same. Ignores suspend blockers. Really no change. (From user > perspective) > > /sys/power/opportunistic > On / Off > While Off the opportunistic suspend is off. > While On, the opportunistic suspend is on and if there are no > suspend blockers the system goes to suspend. > I forgot, of course there needs to be another knob to implement the "on" behaviour in the opportunistic mode /sys/power/block_opportunistic_suspend There you have it. One file, one purpose. > Cheers, > Flo