Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1189739 > unrolled thread
| Started by | Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> |
|---|---|
| First post | 2015-07-22 10:30 +0200 |
| Last post | 2015-07-23 09:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] cpupower: Do not change the frequency of offline cpu Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> - 2015-07-22 10:30 +0200
Re: [PATCH] cpupower: Do not change the frequency of offline cpu Thomas Renninger <trenn@suse.de> - 2015-07-22 13:50 +0200
Re: [PATCH] cpupower: Do not change the frequency of offline cpu Gautham R Shenoy <ego@linux.vnet.ibm.com> - 2015-07-23 07:20 +0200
[RESEND PATCH] cpupower: Do not change the frequency of offline cpu Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> - 2015-07-23 09:00 +0200
| From | Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-07-22 10:30 +0200 |
| Subject | [PATCH] cpupower: Do not change the frequency of offline cpu |
| Message-ID | <pOXzA-1mZ-7@gated-at.bofh.it> |
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) {
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Thomas Renninger <trenn@suse.de> |
|---|---|
| Date | 2015-07-22 13:50 +0200 |
| Message-ID | <pP0H7-5KL-5@gated-at.bofh.it> |
| In reply to | #1189739 |
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>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Gautham R Shenoy <ego@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-07-23 07:20 +0200 |
| Message-ID | <pPh5g-5sT-9@gated-at.bofh.it> |
| In reply to | #1189739 |
Hi Shilpa,
This looks good.
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
On Wed, Jul 22, 2015 at 01:50:49PM +0530, 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) {
> --
> 1.9.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-07-23 09:00 +0200 |
| Subject | [RESEND PATCH] cpupower: Do not change the frequency of offline cpu |
| Message-ID | <pPiE2-7wA-7@gated-at.bofh.it> |
| In reply to | #1189739 |
Check if the cpu is online before changing the frequency/governor of
the cpu.
Reported-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Acked-by: Thomas Renninger <trenn@suse.com>
---
Included Reported-by tag
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) {
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web