lkml.org 
[lkml]   [2010]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/8] PM: Add suspend block api.
    On Mon, 3 May 2010, Rafael J. Wysocki wrote:

    > The main problem is that the entire suspend subsystem is going to work in a
    > different way when suspend blockers are enforced. Thus IMO it makes sense to
    > provide a switch between the "opportunistic" and "forced" modes, because that
    > clearly indicates to the user (or user space in general) how the whole suspend
    > subsystem actually works at the moment.
    >
    > As long as it's "opportunistic", the system will autosuspend if suspend
    > blockers are not active and the behavior of "state" reflects that. If you want
    > to enforce a transition, switch to "forced" first.
    >
    > That's not at all confusing if you know what you're doing. The defailt mode is
    > "forced", so the suspend subsystem works "as usual" by default. You have to
    > directly switch it to "opportunistic" to change the behavior and once you've
    > done that, you shouldn't really be surprised that the behavior has changed.
    > That's what you've requested after all.

    How about changing the contents of /sys/power/state depending on the
    current policy? When the policy is "forced" it should look the same as
    it does now. When the policy is "opportunistic" it should contain
    "mem" and "on".

    Alan Stern



    \
     
     \ /
      Last update: 2010-05-04 00:13    [W:4.100 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site