udelay() broken for SMP cores?

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Wed Apr 21 05:58:34 EDT 2010


Russell King - ARM Linux wrote:
> On Wed, Apr 21, 2010 at 02:39:39AM -0700, skannan at codeaurora.org wrote:
>> Is this an ARM specific decision? Cpufreq certainly supports per cpu scaling
>> and x86 udelay uses per-CPU data. So your concern should apply for x86
>> too. I had the same concern and was planning on bring it up in the cpufreq
>> mailing list after I made sure I didn't misunderstand anything.
> 
> Well, x86 looks buggy in this regard as well - the loops_per_jiffy
> value used is for a CPU which may not run the delay loop.

It looks to me like x86 with a tsc use the tsc for udelay, and handle
cpu changes correctly. See the function delay_tsc in
arch/x86/lib/delay.c. However, they do not seem to handle frequency
changes that well.

-- 
					    Gilles.



More information about the linux-arm-kernel mailing list