On 27 June 2015 at 07:58, pang.xunlei@zte.com.cn wrote:
Hi Vincent,
Vincent Guittot vincent.guittot@linaro.org wrote 2015-06-25 PM 08:37:41:
Sched Tools sched-tools@lists.linaro.org, Amit Kucheria amit.kucheria@linaro.org, Lisa Nguyen lisa.nguyen@linaro.org, mturquette mturquette@baylibre.com, Xunlei Pang
主题
Re: [RESEND PATCH v3] doc: measure the efficiency of cpufreq governors
Hi Xunlei,
On 24 June 2015 at 09:37, Xunlei Pang xlpang@126.com wrote:
From: Xunlei Pang pang.xunlei@linaro.org
[snip]
diff --git a/doc/examples/cpufreq_governor_efficiency/test.sh b/
doc/examples/cpufreq_governor_efficiency/test.sh
new file mode 100755 index 0000000..0160952 --- /dev/null +++ b/doc/examples/cpufreq_governor_efficiency/test.sh @@ -0,0 +1,104 @@ +#!/bin/sh
+set -e
+test_efficiency() {
FILENAME="results_$RANDOM$$.txt"
if [ -e /sys/devices/system/cpu/cpu0/cpufreq/
scaling_available_governors ]; then
cpu0 should be replaced by the target CPU: cpu$2
For "scaling_available_governors", should it be always the same for all the cpus in the same kernel?
You're right, i was wondering if some governors could be forbidden for some clusters of cpus but it's not the case.
Vincent
-Xunlei
for i in $(cat /sys/devices/system/cpu/cpu0/
cpufreq/scaling_available_governors); do
idem
if [ $i = $1 ] ; then
gov_target=$i
fi
export gov_$i=$(echo $i)
done
else
echo "cpufreq sysfs is not available!"
exit
fi
if [ ! $gov_target ] ; then
echo " Can't find $1 governor!"
exit
fi
if [ ! $gov_performance ] ; then
echo "Can't find performance governor!"
exit
fi
if [ ! $gov_powersave ] ; then
echo "Can't find powersave governor!"
exit
fi
if [ $gov_target = $gov_performance ] || [ $gov_target =
$gov_powersave ] ; then
echo "Please input a governor other than
"performance" or "powersave""
exit
[snip]
-- 1.9.1
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.