linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Doug Smythies <dsmythies@telus.net>
Cc: "'Rafael J. Wysocki'" <rafael@kernel.org>,
	"'Rafael J. Wysocki'" <rjw@rjwysocki.net>,
	'Saravana Kannan' <skannan@codeaurora.org>,
	linux-pm@vger.kernel.org
Subject: Re: System will not suspend with highest numbered CPU offline [REGRESSION][BISECTED]
Date: Sat, 5 Sep 2015 13:44:07 +0530	[thread overview]
Message-ID: <20150905081407.GK5285@linux> (raw)
In-Reply-To: <001601d0e7af$01a22140$04e663c0$@net>

On 05-09-15, 00:46, Doug Smythies wrote:
> > It is not clear to me why that echo line (there is only one)
> > would fail.

To me it is clear now :)

> The echo line fails because the related CPU is offline.
> If the failed echo is the last pass through the loop,
> then the script interprets the overall execution of
> 94cpufreq as a failure and aborts the suspend. If the
> failed echo is not the last pass through the loop, then
> the bad exit code gets overwritten with a good one before
> the loop exits.
> 
> Since the loop is merely setting a temporary governor,
> to test I just used performance mode anyway, and commented
> out the echo. pm-suspend with CPU 7 offline then worked fine.
> 
> I have not yet gone back to any before the patch kernel
> to determine why it used to work (it is late in my time zone).
> However, I would have to assume that before the commit in
> question, the echo worked even if the CPU was offline.

So here is the story behind it.
- In your system all CPUs are independent, that is there are no links
  to cpufreq directory, so that check in the script is useless for
  you.
- The $COMMIT in question did a significant change. Earlier, while
  offlining the CPU, we used to remove the cpufreq directory from
  sysfs, which is not the case any more.

- So to be precise, following lines came to your rescue earlier:

# if we do not have a scaling_governor file, skip.
# [ -f "$gov" ] || continue

- But they don't after the patch, as the file and directory are
  present even if the CPU is offline.
- But because the CPU is offline, writing to those files isn't allowed
  and so the echo failed.

Solution to that is that we check for CPU offline as well in the
beginning of the script, and skip if the CPU is offline.

-- 
viresh

  reply	other threads:[~2015-09-05  8:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 21:40 System will not suspend with highest numbered CPU offline [REGRESSION][BISECTED] Doug Smythies
2015-09-04 14:59 ` Rafael J. Wysocki
2015-09-04 14:42   ` Viresh Kumar
2015-09-04 18:41     ` Doug Smythies
2015-09-04 22:26       ` Rafael J. Wysocki
2015-09-04 23:05         ` Doug Smythies
2015-09-05  0:22           ` Rafael J. Wysocki
2015-09-05  1:41             ` Rafael J. Wysocki
2015-09-05  2:34             ` Doug Smythies
2015-09-05  7:46               ` Doug Smythies
2015-09-05  8:14                 ` Viresh Kumar [this message]
2015-09-07 13:32                   ` Rafael J. Wysocki
2015-09-08  2:40                     ` Viresh Kumar
2015-09-11 20:43                       ` Saravana Kannan
2015-09-11 21:30                         ` Rafael J. Wysocki
2015-09-11 22:07                           ` Saravana Kannan
2015-10-11  9:47                             ` Viresh Kumar
2015-10-12 19:43                               ` Saravana Kannan
2015-10-13  3:47                                 ` Viresh Kumar
2015-10-13 19:23                                   ` Saravana Kannan
2015-09-07 13:07                 ` Rafael J. Wysocki
2015-09-07 14:03                   ` Doug Smythies
2015-09-07 20:35                     ` Rafael J. Wysocki
2015-09-04 15:26   ` Doug Smythies

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=20150905081407.GK5285@linux \
    --to=viresh.kumar@linaro.org \
    --cc=dsmythies@telus.net \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=skannan@codeaurora.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;
as well as URLs for NNTP newsgroup(s).