Re: [Powertop] Powertop crashes with 'powertop --auto-tune'
by Michael Mullin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Please see the following patch to address the reported crash
- ---
- From e994a414f619410877023fce35ade12d1cfce68d Mon Sep 17 00:00:00 2001
From: Michael Mullin <masmullin(a)hush.com>
Date: Thu, 22 Jan 2015 16:33:31 -0500
Subject: [PATCH] If "dir" is closed early inside create_add_devfreq_devices()
then there is a potential double free due to a second close during the
cleanup phase in clear_all_devfreq()
Signed-off-by: Michael Mullin <masmullin(a)hush.com>
- ---
src/devices/devfreq.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
index d2e56e3..f652a57 100644
- --- a/src/devices/devfreq.cpp
+++ b/src/devices/devfreq.cpp
@@ -247,6 +247,7 @@ void create_all_devfreq_devices(void)
fprintf(stderr, "Devfreq not enabled\n");
is_enabled = false;
closedir(dir);
+ dir = NULL;
return;
}
@@ -327,6 +328,8 @@ void clear_all_devfreq()
}
all_devfreq.clear();
/* close /sys/class/devfreq */
- - if (dir != NULL)
+ if (dir != NULL) {
closedir(dir);
+ dir = NULL;
+ }
}
- --
2.2.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJUwXCLAAoJEJHz7fmWOTHsR2YH/3ASltE3MVMu7V6HoKYvGHFL
VsjQNenXTEYLSSiVMZfbZHaypHnH8SdhfJTBMHF1+v2fS2LzuEA/qFfleS39+L9S
E/EZGdCWXnrK56pa+Lu6JWguwCNmyhNyOQ+nnaU6v9jH0YmQGx5hMPZu/aPhlZTU
LWHxj0Knch1WGUATlofOy98XCbhY9yDICQxMDfJicun6cOAahlQminqJcLTSyGbY
t5lVWR2E1ybnpojlot8t2BRmCYR210VmB+Pbpralk+nSRtX2rx4yT/Hx5B3wBbwJ
msNs+6+6WKG20EVhxxbTSqLAar9ZMf8w+K8Qsz8Zqg4yzaGra3u6kl80Wr/ElqA=
=ObTH
-----END PGP SIGNATURE-----
7 years, 5 months
Frequency stats show only 100% idle on servers in "performance" profile
by Wang, Xiaolong
Hi Powertop developers,
Please help to evaluate if this is a bug:
I was using Powertop 2.6.1 on RHEL7.1beta and some servers including Ivybridge-EP/EX and Haswell-1S/EP/EX.
And found Frequency stats show only 100% idle and no other frequency percentage, like the following:
PowerTOP 2.6.1 Overview Idle stats Frequency stats Device stats Tunab
Package | Core | CPU 0 CPU 4
| | Actual 3.9 GHz 3.8 GHz
Idle 100.0% | Idle 100.0% | Idle 100.0% 100.0%
| Core | CPU 1 CPU 5
| | Actual 3.9 GHz 3.9 GHz
| Idle 100.0% | Idle 100.0% 100.0%
| Core | CPU 2 CPU 6
| | Actual 3.8 GHz 3.8 GHz
| Idle 100.0% | Idle 100.0% 100.0%
| Core | CPU 3 CPU 7
| | Actual 3.8 GHz 3.7 GHz
| Idle 100.0% | Idle 100.0% 100.0%
When I add workloads, the Idle percentage drops, but still no other frequency percentage.
For servers, RHEL7 would use "throughput-performance" profile, which would keep processor at its top frequency.
I just think PowerTop should not display idle percentage only, in my point of view,
when no workload, 90%+ idle and a few percentage at max frequency is reasonable.
when high workload, a few percentage idle and high percentage at max frequency is reasonable.
The following is the result of "balanced" profile,
at least not all 100% idle.
PowerTOP 2.6.1 Overview Idle stats Frequency stats Device stats Tunab
Package | Core | CPU 0 CPU 4
| | Actual 3.6 GHz 3.3 GHz
Idle 99.8% | Idle 100.0% | Idle 100.0% 100.0%
4.00 GHz 0.1% | 4.00 GHz 0.0% | 4.00 GHz 0.0% 0.0%
3.31 GHz 0.0% | |
1400 MHz 0.0% | |
2.10 GHz 0.1% | |
| Core | CPU 1 CPU 5
| | Actual 3.6 GHz 3.5 GHz
| Idle 99.8% | Idle 100.0% 99.9%
| 4.00 GHz 0.1% | 3.31 GHz 0.0% 0.1%
| 3.31 GHz 0.0% | 1400 MHz 0.0% 0.1%
| 1400 MHz 0.0% | 4.00 GHz 0.0%
| 2.10 GHz 0.1% |
| Core | CPU 2 CPU 6
| | Actual 3.4 GHz 3.2 GHz
| Idle 100.0% | Idle 100.0% 100.0%
| 4.00 GHz 0.0% | 4.00 GHz 0.0% 0.0%
| 2.10 GHz 0.0% | 2.10 GHz 0.0%
| |
| |
| Core | CPU 3 CPU 7
| | Actual 3.4 GHz 2.9 GHz
| Idle 100.0% | Idle 100.0% 100.0%
| 3.31 GHz 0.0% | 3.31 GHz 0.0% 0.0%
| 4.00 GHz 0.0% | 4.00 GHz 0.0%
| 2.10 GHz 0.0% | 2.10 GHz 0.0%
Thanks,
-Wang, Xiaolong from Intel OTC OSV-Enabling
7 years, 5 months