From: "Doug Smythies" <dsmythies@telus.net>
To: "'Rafael J. Wysocki'" <rjw@rjwysocki.net>,
'Viresh Kumar' <viresh.kumar@linaro.org>
Cc: "'Rafael J. Wysocki'" <rafael@kernel.org>,
'Saravana Kannan' <skannan@codeaurora.org>,
linux-pm@vger.kernel.org
Subject: RE: System will not suspend with highest numbered CPU offline [REGRESSION][BISECTED]
Date: Mon, 7 Sep 2015 07:03:16 -0700 [thread overview]
Message-ID: <000201d0e975$f2ce82d0$d86b8870$@net> (raw)
In-Reply-To: <15201917.ny03gYuJf6@vostro.rjw.lan>
To wrap this up, I was thinking to file a bug report
on the pm-utils bug system and then to file a bug against
the distribution that I use (Ubuntu Server), linking to the
upstream bug report.
I don't have it working correctly yet, but I was hoping
to suggest a fix with the bug reports.
Something like (still has all my debug stuff also):
hibernate_cpufreq()
{
( cd /sys/devices/system/cpu/
for x in cpu[0-9]*; do
# if cpufreq is a symlink, it is handled by another cpu. Skip.
[ -L "$x/cpufreq" ] && continue
gov="$x/cpufreq/scaling_governor"
# if we do not have a scaling_governor file, skip.
[ -f "$gov" ] || continue
echo "before $x online check"
+ # if the CPU is offline, skip, unless no file, i.e. CPU0.
+ [ $(cat "$x/online") = "1" -o ! -f "$x/online" ] || continue
Or
+ if [ $(cat "$x/online") = "1" ] || [ ! -f "$x/online" ]; then
+ continue;
+ fi
Or something similar that actually works.
echo "after $x online check"
# if our temporary governor is not available, skip.
grep -q "$TEMPORARY_CPUFREQ_GOVERNOR" \
"$x/cpufreq/scaling_available_governors" || continue
savestate "${x}_governor" < "$gov"
echo "$x"
echo "$TEMPORARY_CPUFREQ_GOVERNOR"
echo "$gov"
echo "$TEMPORARY_CPUFREQ_GOVERNOR" > "$gov"
done )
}
With the proposed fix not dependent on CPU0 at all, just the condition that if
the file exists, that the CPU be online, and if it doesn't exist then assume the
CPU is online. As you both pointed out, there is a previous check and skip for
the no governor or no CPU condition or older kernel conditions.
next prev parent reply other threads:[~2015-09-07 14:03 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
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 [this message]
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='000201d0e975$f2ce82d0$d86b8870$@net' \
--to=dsmythies@telus.net \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=skannan@codeaurora.org \
--cc=viresh.kumar@linaro.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).