From: Thomas Renninger <trenn@suse.de>
To: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Cc: rafael.j.wysocki@intel.com, peter.senna@gmail.com,
ego@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpupower: Do not change the frequency of offline cpu
Date: Wed, 22 Jul 2015 13:44:54 +0200 [thread overview]
Message-ID: <5038391.4TLRDc8YB0@skinner> (raw)
In-Reply-To: <1437553249-25400-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com>
On Wednesday, July 22, 2015 01:50:49 PM Shilpasri G Bhat wrote:
> Check if the cpu is online before changing the frequency/governor of
> the cpu.
>
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> ---
> tools/power/cpupower/utils/cpufreq-set.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/power/cpupower/utils/cpufreq-set.c
> b/tools/power/cpupower/utils/cpufreq-set.c index f656e58..4e21357 100644
> --- a/tools/power/cpupower/utils/cpufreq-set.c
> +++ b/tools/power/cpupower/utils/cpufreq-set.c
> @@ -17,6 +17,7 @@
>
> #include "cpufreq.h"
> #include "helpers/helpers.h"
> +#include "helpers/sysfs.h"
>
> #define NORM_FREQ_LEN 32
>
> @@ -318,6 +319,9 @@ int cmd_freq_set(int argc, char **argv)
> cpufreq_cpu_exists(cpu))
> continue;
>
> + if (sysfs_is_cpu_online(cpu) != 1)
> + continue;
> +
> printf(_("Setting cpu: %d\n"), cpu);
> ret = do_one_cpu(cpu, &new_pol, freq, policychange);
> if (ret) {
Thanks for catching this one and sending a patch!
Acked-by: Thomas Renninger <trenn@suse.com>
next prev parent reply other threads:[~2015-07-22 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 8:20 [PATCH] cpupower: Do not change the frequency of offline cpu Shilpasri G Bhat
2015-07-22 11:44 ` Thomas Renninger [this message]
2015-07-23 5:12 ` Gautham R Shenoy
2015-07-23 6:50 ` [RESEND PATCH] " Shilpasri G Bhat
2015-07-23 20:58 ` 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=5038391.4TLRDc8YB0@skinner \
--to=trenn@suse.de \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peter.senna@gmail.com \
--cc=rafael.j.wysocki@intel.com \
--cc=shilpa.bhat@linux.vnet.ibm.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