Hello,
I tested powertop on Samsung Arndale Board with Ubuntu Saucy Server 14.01
with custom kernel (config file attached, powertop config options enabled),
and reported a bug 1316096. Also, I found the other bug 1316096 happening
on arndale board.
In short, bug 1316096 - Powertop displays "nan" on top [summary] where it
should show legal value.
Summary: nan wakeups/second, nan
GPU ops/seconds, nan VFS ops/sec and -0.0% CPU use <--- displays "nan"
instead of valid value
bug 1316096 - Idle stats & Frequency stats pages are empty.
I did some debugging and it seems that the root cause of both the bugs may
be same. It looks like the parsing code enumerate_cpus()[src/cpu/cpu.cpp]
called from main.cpp, is expecting /proc/cpuinfo file in a particular
format which works on Intel but not on ARM.
On Intel, it gets the file in the format expected. However, on ARM on
Arndale board with saucy server, the file looks as below -
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4
idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc0f
CPU revision : 4
processor : 1
model name : ARMv7 Processor rev 4 (v7l)
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4
idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc0f
CPU revision : 4
Hardware : SAMSUNG EXYNOS5 (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
The parsing code which gathers information about cpus, fails to parse this
file and as a result the vector "all_cpus" remains empty.
I played with it a bit more and added a few lines to get a work around as
follows -
in function enumarate_cpus():
if (strncmp(line, "processor\t",10) == 0) {
char *c;
c = strchr(line, ':');
if (c) {
c++;
number = strtoull(c, NULL, 10);
* handle_one_cpu(number, "Samsung", 0, 0);
[ line added]*
* set_max_cpu(number); [ line added]*
}
}
With this changes, idle stat and frequency pages were populated and summary
was shown properly as noted below -
*Summary: 392.6 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and
4.0% CPU use*
I think due to this bug, the information shown on summary page was also not
correct and some other info displayed by powertop may be incorrect too.
Please comment.
--
Thanks,
-Meraj
Hello,
It looks like README file in powertop branch is out of sync with how
powertop should be actually built.
It should be updated.
diff --git a/README b/README
index 2961eba..d83b315 100644
--- a/README
+++ b/README
@@ -2,9 +2,10 @@
------------------------------
To build and install PowerTOP type the following commands,
- ./configure
- ./make
- ./make install
+ autoreconf -sfi
+ ./configure
+ make
+ make install
Note: For Android (running Intel Architecture ) there is a Android.mk
that was provided by community members, and at this time is supported
--
Thanks,
-Meraj
Hi All,
In arch/arm64/include/asm/barrier.h, there is the definition of
smp_mb()/smp_rmb()/smp_wmb() for arm64. I noticed that all the 3 macors
are using "dmb ishxx", which is only affect the cluster of the CPU
executing the instruction. But in the big.LITTLE system, there will be 2
cluster. So the smp_mb()/smp_rmb()/smp_wmb() cannot affect all the CPU
in the system.
Is there other considerations so that smp_mb()/smp_rmb()/smp_wmb() are
implemented to "only affecting inner sharable cores"?
Best Regards,
Kelvin K. Li
---------------------------------------------------------------
Software Team, VIA Technologies, Inc.
5F, VIA Tower, 1 Zhongguancun East Road,
Haidian District, Beijing, 100084
Tel: 86-10-59852288 ext.3620
mailto: kelvinkli(a)via-alliance.com
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat(a)linaro.org>
---
- This will help in catching issue like https://lkml.org/lkml/2014/3/25/122
- Tested on my x86 dev m/c
Output:
running hotplug stress on cpu : cpu1
pass: cpu hotplug count = 200 duration = 16.98 seconds
running hotplug stress on cpu : cpu2
pass: cpu hotplug count = 200 duration = 16.36 seconds
running hotplug stress on cpu : cpu3
pass: cpu hotplug count = 200 duration = 15.05 seconds
- Issue: For a hotplug count of 500 the system just hangs. Need to
manually restart.
Is it safe to simply plugout the cpu? What will happend to the tasks
in the cpu runqueue.
---
cpuhotplug/cpuhotplug_09.sh | 70 ++++++++++++++++++++++++++++++++++++++++++
cpuhotplug/cpuhotplug_09.txt | 1 +
2 files changed, 71 insertions(+)
create mode 100755 cpuhotplug/cpuhotplug_09.sh
create mode 100644 cpuhotplug/cpuhotplug_09.txt
diff --git a/cpuhotplug/cpuhotplug_09.sh b/cpuhotplug/cpuhotplug_09.sh
new file mode 100755
index 0000000..be0c91c
--- /dev/null
+++ b/cpuhotplug/cpuhotplug_09.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# PM-QA validation test suite for the power management on Linux
+#
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributors:
+# Sanjay Singh Rawat <sanjay.rawat(a)linaro.org>
+# - initial API and implementation
+#
+
+# URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/P…
+
+source ../include/functions.sh
+STRESS_COUNT=200
+
+cpuhotplug_stress() {
+ local cpu=$1
+ local dirpath=$CPU_PATH/$1
+ local state=
+ local start=
+ local end=
+ shift 1
+
+ if [ "$cpu" == "cpu0" ]; then
+ # skipping main cpu
+ return 0
+ fi
+
+ echo "running hotplug stress on cpu :" $cpu
+ start=$(echo $(awk '{print $1}' /proc/uptime))
+
+ for i in $(seq 1 $STRESS_COUNT);
+ do
+ set_offline $cpu
+ state=$(get_online $cpu)
+ if [ $state -ne 0 ]; then
+ echo "fail: cpu offline failed at " $i
+ return 1
+ fi
+
+ set_online $cpu
+ state=$(get_online $cpu)
+ if [ $state -ne 1 ]; then
+ echo "fail: cpu online failed at " $i
+ return 1
+ fi
+ done
+
+ end=$(echo $(awk '{print $1}' /proc/uptime))
+ echo "pass: cpu hotplug in/out count =" $i "duration =" $(echo "$end-$start" | bc) "seconds"
+ return 0
+}
+
+for_each_cpu cpuhotplug_stress
+test_status_show
diff --git a/cpuhotplug/cpuhotplug_09.txt b/cpuhotplug/cpuhotplug_09.txt
new file mode 100644
index 0000000..5b0f8ac
--- /dev/null
+++ b/cpuhotplug/cpuhotplug_09.txt
@@ -0,0 +1 @@
+test to stress cpu hotplug feature
--
1.7.10.4
FYI: for those interested in Fedora, I thought I would pass on
an announcement from Paul Whalen recently sent to the fedora-arm
mailing list...you can now pick a remix image using the links
highlighted below...
Good afternoon folks,
David Marlin has posted a new Aarch64 Fedora Rawhide Remix for those
interested in upgrading from the F19 bootstrap image.
The remix includes a lookaside repository[1] to provide a patched
kernel and packages not yet built for aarch64.
Instructions for downloading and using the remix have been added to
the Quickstart[2] page.
Paul
[1] - http://dmarlin.fedorapeople.org/yum/f21/
[2] - https://fedoraproject.org/wiki/Architectures/ARM/AArch64/QuickStart
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Linaro Enterprise Group
al.stone(a)linaro.org
-----------------------------------