public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-pm@vger.kernel.org, Len Brown <len.brown@intel.com>,
	Pavel Machek <pavel@ucw.cz>, Zhang Rui <rui.zhang@intel.com>
Subject: [stable -3.14] PM backports for pm_test / CONFIG_PM_DEBUG
Date: Wed, 3 Sep 2014 18:02:19 -0700	[thread overview]
Message-ID: <20140904010219.GA18411@ld-irv-0074> (raw)

Hi,

If I enable CONFIG_PM_DEBUG on a 3.14.y kernel, I can see the following
results:

    # cat /sys/power/state
    freeze standby mem
    # cat /sys/power/pm_test
    [none] core processors platform devices freezer
    # echo core > /sys/power/pm_test
    # cat /sys/power/state
    [   22.581289] Unsupported pm_test mode for freeze state, please choose none/freezer/devices/platform.
    standby mem

Note how 'freeze' is dropped from the supported states, and I get an
extra printk message when I'm just checking if the state is valid.

It looks like if I backport a few fixes, I get more sane behavior, where
the warnings (and -EAGAIN) appear only when I actually try to enter an
unsupported test mode:

    # echo core > /sys/power/pm_test
    # cat /sys/power/state
    freeze standby mem
    # echo freeze > /sys/power/state
    [   27.833141] PM: Unsupported test mode for freeze state,please choose none/freezer/devices/platform.
    sh: echo: write error: Resource temporarily unavailable

I think I've narrowed it down to this commit that should be backported
to -stable (for 3.9+?):

    43e8317b0bba PM / sleep: Use valid_state() for platform-dependent sleep states only

But it needs to drag along this dependency too:

    27ddcc6596e5 PM / sleep: Add state field to pm_states[] entries

While at this, it looks like this commit might be deserving of -stable
(3.9+). I haven't tested this one, as I don't have a good freeze+cpuidle
setup; it just shows up in the commit log with an interesting
description and a 'Fixes' tag:

    f3f125324fc1 PM / suspend: Make cpuidle work in the "freeze" state

Regards,
Brian

             reply	other threads:[~2014-09-04  1:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  1:02 Brian Norris [this message]
2014-09-04 19:40 ` [stable -3.14] PM backports for pm_test / CONFIG_PM_DEBUG Rafael J. Wysocki
2014-09-04 21:14   ` Brian Norris
2014-09-04 21:21   ` [PATCH 3.10.y+] PM / sleep: Use valid_state() for platform-dependent sleep states only Brian Norris
2014-09-05  6:29     ` Francis Moreau
2014-09-05  7:45       ` Brian Norris
2014-09-05 14:52         ` Francis Moreau
2014-09-05 21:47         ` Greg Kroah-Hartman
2014-09-05 22:08           ` Brian Norris
2014-09-05 22:36             ` Greg Kroah-Hartman
2014-09-05 22:45               ` Brian Norris

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=20140904010219.GA18411@ld-irv-0074 \
    --to=computersforpeace@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=stable@vger.kernel.org \
    /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