全志プラットフォーム方案CPU周波数切周波数安定性テスト


最近全志の方案でCPU周波数の切周波数の安定性のテストをして、ひっきりなしに周波数を切り替えて、CPUが各周波数の上で走る時の安定性をテストして、テストの設計の構想は以下の通りです:(R 331を例にとります)
   1.まずcpu周波数を1200 Mに調整して、memtester 10 M 1000を走って、300秒後にkillが落ちます
   2.周波数を1104 Mにして、30秒memtesterを走って、それから1段下に調整して、30秒memtesterを走り続けて、このように3.各段は30秒、最下位60 Mまで300秒4を走る.CPU周波数は60 Mから1段ずつ上昇し、1段ごとに30秒memtesterを走り、ダウンタイムの流れに逆らって走る.   5.繰り返し1.
cpuの周波数点:1.2 G 1.104 G 1.008 G 912 M 816 M 720 M 648 M 600 M 504 M 480 M 408 M 312 M 240 M 120 M 60 M
周波数変調ポリシーはuserspaceを選択し、ユーザーが走りたいだけ走ることです.
echo userspace >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
全志の周波数は一般的にいくつかの等級を書くのが死んで、いくつかの等級の間でしか切り替えることができなくて、例えばR 331は上のです:
1.2G   1.104G  1.008G  912M  816M   720M  648M   600M  504M   480M    408M    312M  240M   120M  60M
これらのパラメータは全志チップでテストされたが,なぜこれらの数値が分からないのか,倍周波数に関係しているようだ.
 
テストスクリプト(暴力的な書き込みの死のサイクル):
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
test_count=0
test_count_total=99999
sleep_time_long=300
sleep_time_short=30

#set CPU modle to userspace,set MAX frep to 1200M,set MIN frep to 60M
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 60000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

while [ ${test_count} -le  ${test_count_total} ]
do
	#test times
	let test_count+=1
	echo "test count: "${test_count}
	
	#1.set CPU freq 1200M
	echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
	echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_long} killall memtester #2.set CPU freq 1104M echo 1104000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #3.set CPU freq 1008M echo 1008000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #4.set CPU freq 912M echo 912000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #5.set CPU freq 816M echo 816000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #6.set CPU freq 720M echo 720000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #7.set CPU freq 648M echo 648000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #8.set CPU freq 600M echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #9.set CPU freq 504M echo 504000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #10.set CPU freq 480 echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #11.set CPU freq 408M echo 408000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #12.set CPU freq 312M echo 312000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #13.set CPU freq 240M echo 240000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #14.set CPU freq 120M echo 120000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #15.set CPU freq 60M echo 60000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_long} killall memtester #16.set CPU freq 120M echo 120000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #17.set CPU freq 240M echo 240000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #18.set CPU freq 312M echo 312000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #19.set CPU freq 408M echo 408000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #20.set CPU freq 480M echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #21.set CPU freq 504M echo 504000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #22.set CPU freq 600M echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #23.set CPU freq 648M echo 648000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #24.set CPU freq 720M echo 720000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #25.set CPU freq 816M echo 816000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #26.set CPU freq 912M echo 912000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #27.set CPU freq 1008M echo 1008000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester #28.set CPU freq 1104M echo 1104000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo -e "
SET CPU FREQ :" cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq memtester 10M 1000 & sleep ${sleep_time_short} killall memtester done echo "test_count: " ${test_count} exit 0

*20181008修正し、スクリプトで切り替えた頻度を修正し、すべてのサポートの頻度を加算しました.