Re: nacl and CPU frequency.
On 22/09/12 15:28, peter green wrote:
> I'm trying to get nacl built on more architectures in debian, in
> particular I want to see it build on arm*.
> In order to build successfully nacl needs to determine the CPU frequency
I think you need to analyse what it's doing with the CPU frequency,
because on most modern hardware the frequency changes due to power
saving and other stuff.
It would appear that nacl is designed to have a concept of measuring elapsed
time in CPU cycles. But when measurements in true CPU cycles (obtained
using inline assembler) are not available it falls back to using time values
from the OS and multiplying them by the number of CPU cycles per second.
This appears to be used for measuring performance of various things.
I therefore conclude that if it's not returning elapsed times in true CPU
cycles it probablly doesn't matter much if the supposed CPU speed and the
real CPU speed are not exactly the same.
As such unless someone objects I plan to patch the code to fallback to
using bogomips as a "psuedo CPU speed" if true CPU speed cannot be