[Openpxa-users] Linux udelay() is way off

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Jan 20 14:30:13 EST 2011

On Thu, Jan 20, 2011 at 08:18:10PM +0100, Bjørn Forsman wrote:
> [   11.425363] cpufreq-core: saving 518144 as reference value for
> loops_per_jiffy; freq is 312000 kHz
> [   11.425523] cpufreq-core: scaling loops_per_jiffy to 1036288 for
> frequency 624000 kHz

So despite scaling lpj by a factor of two for the doubling in clock
frequency, we see a 30% error in it?

Is it possible to boot at 624MHz and report the resulting lpj?
Alternatively, call calibrate_delay() after the cpufreq switch to
624MHz, disabling the 'printed' stuff and see what it reports.

I wonder if this is a case where it scales according to

	new_lpj = ref_lpj * (new_freq / ref_freq) + some_offset

rather than just

	new_lpj = ref_lpj * (new_freq / ref_freq)

More information about the linux-arm-kernel mailing list