Linux Power Management development
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3][update] PM / sleep: Introduce command line argument for sleep state enumeration
Date: Mon, 26 May 2014 16:25:56 +0530	[thread overview]
Message-ID: <53831DBC.8080404@linux.vnet.ibm.com> (raw)
In-Reply-To: <2276224.JN17nYXlNX@vostro.rjw.lan>

On 05/26/2014 04:30 PM, Rafael J. Wysocki wrote:
> On Monday, May 26, 2014 02:01:14 PM Srivatsa S. Bhat wrote:
>> On 05/23/2014 06:33 PM, Rafael J. Wysocki wrote:
>>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>
>>> On some systems the platform doesn't support neither
>>> PM_SUSPEND_MEM nor PM_SUSPEND_STANDBY, so PM_SUSPEND_FREEZE is the
>>> only available system sleep state.  However, some user space frameworks
>>> only use the "mem" and (sometimes) "standby" sleep state labels, so
>>> the users of those systems need to modify user space in order to be
>>> able to use system suspend at all and that is not always possible.
>>>
>>
>> So, is this going to be a temporary solution until all the user-space
>> frameworks have been fixed? I certainly hope so, because this clearly looks
>> like a bug (or a lack of feature) in user-space to me... in the sense that
>> those user-space frameworks don't have support for (i.e., don't know how to
>> deal with) freeze-only systems yet.
>>
>> The more elegant long term solution would have been to teach the kernel to
>> export *truly* relative names such as SUSPEND_DEEP, SUSPEND_SHALLOW,
>> and SUSPEND_LIGHT or something like that (of course, we can debate on what
>> naming would suit best).
> 
> I agree and that's a logical next step, so I have a plan to rename the kernel
> symbols corresponding to each state so that they reflect the code more closely
> (for example, the current PM_SUSPEND_MEM and PM_SUSPEND_STANDBY depend on the
> platform to support them, but that is not clear from the symbol naming, and on
> many platforms _MEM doesn't mean "suspend-to-RAM" anyway).
> 

Ok..

> The strings in the interface are a somewhat different matter, because user
> space already depends on them (which is the source of the problem here), so we
> may need to keep them or at least respond to them as expected when written to
> /sys/power/state.
>

Right, I see your point..
 
> I personally think that we should use "sleep", "snooze" and "pause" to reflect
> the "sleep depth".  And possibly "hibernate" instead of "disk".
> 

Yeah, that sounds good.

>> But this patch continues to keep the names 'SUSPEND_MEM' ("mem") etc., which
>> still implies that we are doing Suspend-to-RAM, because the name itself betrays
>> that info. So IMHO it doesn't really match what the command-line-switch
>> 'relative_sleep_states' says.
>>
>> But I understand that this is a quick hack to make existing user-space work
>> with systems that support only the freeze state. However, for the reasons
>> mentioned above, I hope that this is a temporary solution and we can remove
>> or enhance this once all those user-space frameworks have been fixed.
> 
> Well, it is supposed to be temporary, but I'm not sure if we can count on all
> user space to be fixed in any reasonable time frame (think about Android, for
> example).
> 

Hmm, that's sad. But anyway, I just wanted to point out issues with this patch
and suggest possible enhancements. But since you seem to have already thought
through all of this, I have no objections to this patch.

Thank you!
 
Regards,
Srivatsa S. Bhat


  reply	other threads:[~2014-05-26 10:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 23:21 [PATCH 0/3] PM / sleep: Make it possible to change the labeling of sleep states Rafael J. Wysocki
2014-05-22 23:22 ` [PATCH 1/3] PM / sleep: Add state field to pm_states[] entries Rafael J. Wysocki
2014-05-22 23:23 ` [PATCH 2/3] PM / sleep: Use valid_state() for platform-dependent sleep states only Rafael J. Wysocki
2014-05-23 13:01   ` [PATCH 2/3][update] " Rafael J. Wysocki
2014-05-22 23:24 ` [PATCH 3/3] PM / sleep: Introduce command line argument for sleep states enumeration Rafael J. Wysocki
2014-05-23 13:03   ` [PATCH 3/3][update] PM / sleep: Introduce command line argument for sleep state enumeration Rafael J. Wysocki
2014-05-26  8:31     ` Srivatsa S. Bhat
2014-05-26 11:00       ` Rafael J. Wysocki
2014-05-26 10:55         ` Srivatsa S. Bhat [this message]
2014-06-10 13:12     ` Pavel Machek
2014-06-10 15:23       ` Rafael J. Wysocki
2014-06-10 15:25         ` Rafael J. Wysocki
2014-06-10 19:59         ` Pavel Machek
2014-06-10 20:34           ` Rafael J. Wysocki
2014-06-13 21:46             ` Pavel Machek
2014-06-13 22:16               ` Rafael J. Wysocki
2014-06-13 22:23                 ` Rafael J. Wysocki
2014-06-13 23:19                   ` Rafael J. Wysocki
2014-07-30 10:55                     ` Pavel Machek
2014-08-01 13:54                       ` Rafael J. Wysocki
2014-08-16  8:10                         ` Pavel Machek
2014-08-17  4:16                           ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53831DBC.8080404@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox