From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: "Jarzmik, Robert" <robert.jarzmik@intel.com>
Cc: "Rafael J. Wysocki" <rjkw@sisk.pl>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: S3, SMP non boot cpus and /sys/devices/system/cpu[1-9]/cpufreq/scaling_max_freq
Date: Tue, 14 May 2013 02:10:35 +0530 [thread overview]
Message-ID: <51914FC3.7080003@linux.vnet.ibm.com> (raw)
In-Reply-To: <65F5F98566038744B1B43C8FD3B7549F191101C4@IRSMSX104.ger.corp.intel.com>
On 05/13/2013 06:31 PM, Jarzmik, Robert wrote:
> Hi Rafael,
>
> I came across that little odd behavior in "Suspend to RAM" :
> 1) I do a "chmod audio:audio /sys/devices/system/cpu1/cpufreq/scaling_max_freq (I know, stupid, but it's for the example)
> 2) I do a "echo mem > /sys/power/state"
> 3) I resume the kernel
> => here the permissions of /sys/devices/system/cpu1/cpufreq/scaling_max_freq have turned back to root:root
>
> OK, fair well, I add a UDEV rule which does a "chown audio:audio /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq" upon udev event "online, /sys/...".
> And here it becomes interesting :
> - the udev event "offline" or "online" never comes with the "Suspend to RAM" testcase
> - but the same udev event comes when I manually do a "echo 0 > /sys/devices/system/cpu/cpu1/online"
>
> So my question is : is it intended behavior that no udev offline/online event happens on S3 for non-boot CPUs, or is it something I should try to fix ?
>
IMHO, using CPU hotplug (offline/online of CPUs) in the S3 path is
supposed to be totally internal to the suspend/resume code.
It is not intended for userspace to know that we are internally
offlining/onlining CPUs. So I'm not surprised that udev events
are not triggered for hotplug in S3 path. And that's not a bug,
if you ask me. (And yes, even code-wise, we use a slightly different
path in the S3 code, to initiate hotplug. That's why the uevents
are by-passed.)
The user initiated an S3 operation, not CPU hotplug. So there is
no reason to surprise the user with unexpected events.
Put another way, in the future, if we change the kernel code
to do S3 without using hotplug, then there should be no visible
change in userspace, because how S3 is handled in the kernel is
intended to be an "internal" operation.
Regards,
Srivatsa S. Bhat
next prev parent reply other threads:[~2013-05-13 20:43 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 13:01 S3, SMP non boot cpus and /sys/devices/system/cpu[1-9]/cpufreq/scaling_max_freq Jarzmik, Robert
2013-05-13 20:40 ` Srivatsa S. Bhat [this message]
2013-05-13 23:32 ` Rafael J. Wysocki
2013-05-14 9:06 ` Jarzmik, Robert
2013-05-14 10:09 ` Srivatsa S. Bhat
2013-05-14 10:22 ` Viresh Kumar
2013-05-14 10:27 ` Srivatsa S. Bhat
2013-05-14 11:22 ` Rafael J. Wysocki
2013-05-14 11:20 ` R, Durgadoss
2013-05-14 11:33 ` Rafael J. Wysocki
2013-05-14 11:36 ` R, Durgadoss
2013-05-14 11:54 ` Jarzmik, Robert
2013-05-14 12:34 ` Srivatsa S. Bhat
2013-05-14 13:00 ` Rafael J. Wysocki
2013-05-14 13:54 ` Srivatsa S. Bhat
2013-05-14 20:22 ` Rafael J. Wysocki
2013-05-15 8:24 ` Jarzmik, Robert
2013-05-15 8:37 ` R, Durgadoss
2013-05-15 6:16 ` Viresh Kumar
2013-05-15 6:30 ` Srivatsa S. Bhat
2013-05-15 6:45 ` Viresh Kumar
2013-05-15 7:33 ` Srivatsa S. Bhat
2013-05-15 7:44 ` Viresh Kumar
2013-05-15 8:18 ` Srivatsa S. Bhat
2013-05-15 20:50 ` Rafael J. Wysocki
2013-05-14 12:58 ` Rafael J. Wysocki
2013-05-14 14:01 ` Jarzmik, Robert
2013-05-14 14:16 ` Srivatsa S. Bhat
2013-05-14 14:05 ` Alan Stern
2013-05-15 9:20 ` Jarzmik, Robert
2013-05-15 14:15 ` Alan Stern
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=51914FC3.7080003@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjkw@sisk.pl \
--cc=robert.jarzmik@intel.com \
/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