embeded/ARM2015. 3. 3. 23:36

그래도. 라즈베리 파이 2 이녀석

Cortex-A7 700Mhz~900MHz 작동하는 녀석인데

700MHz 치고는 너무 낮은 36MHz 정도의 bogoMIPS를 출력한다.

이상해서 찾아보다 보니


"무한루프(busy-wait loop)가 아닌 타이머 기반의 딜레이를 이용하여 udealy() 함수를 사용함으로서

cpu의 부하를 줄이고 프로세서의 클럭 변경시에 강인하도록 변경되었고 부팅시에 calibration이 필요없어 졌지만

역효과로 bogoMIPS를 측정할때 CPU 클럭이 측정이 되는게 아닌 타이머 클럭이 측정되게 되는 문제가 발생했다."

정도?

Timer-based delays

In 2012, ARM contributed a new udelay implementation allowing the system timer built into many ARMv7 CPUs to be used instead of a busy-wait loop.[8] Timer based delays are more robust on systems that use frequency scaling to dynamically adjust the processor's speed at runtime, as loops_per_jiffies values may not necessarily scale linearly. Also, since the timer frequency is known in advance, no calibration is needed at boot time.


One side effect of this change is that the BogoMIPS value will reflect the timer frequency, not the CPU's core frequency. Typically the timer frequency is much lower than the processor's maximum frequency, and some users may be surprised to see an unusually low BogoMIPS value when comparing against systems that use traditional busy-wait loops.


[링크 : http://en.wikipedia.org/wiki/BogoMips] 


ARM: 7452/1: delay: allow timer-based delay implementation to be selected

This patch allows a timer-based delay implementation to be selected by

switching the delay routines over to use get_cycles, which is

implemented in terms of read_current_timer. This further allows us to

skip the loop calibration and have a consistent delay function in the

face of core frequency scaling.


To avoid the pain of dealing with memory-mapped counters, this

implementation uses the co-processor interface to the architected timers

when they are available. The previous loop-based implementation is

kept around for CPUs without the architected timers and we retain both

the maximum delay (2ms) and the corresponding conversion factors for

determining the number of loops required for a given interval. Since the

indirection of the timer routines will only work when called from C,

the sa1100 sleep routines are modified to branch to the loop-based delay

functions directly.

[링크 : https://git.kernel.org/.../linux.git/commit/?id=d0a533b18235d36206b9b422efadb7cee444dfdb] 


아무튼.. 뜬금없는 결론은...

ARMv7 부터는 bogoMIPS가 그리 신뢰할 만한(?) CPU 클럭 예측 방법이 아니게 되었다 정도이려나?

Posted by 구차니