ARM11 MPCore: Adding nop to __delay() doubles the BogoMIPS/lpj
Catalin Marinas
catalin.marinas at arm.com
Thu Jan 28 08:03:02 EST 2010
On Wed, 2010-01-27 at 16:45 +0000, Dirk Behme wrote:
> On a 400MHz ARM11 MPCore system (NEC NaviEngine based) with kernel
> 2.6.32 we found that BogoMIPS/loops per jiffies ~doubles (see below
> [1]) by adding a nop to __delay():
>
> --- a/arch/arm/lib/delay.S
> +++ b/arch/arm/lib/delay.S
> @@ -41,6 +41,9 @@ ENTRY(__const_udelay) @ 0 <= r0 <= 0x
> @ Delay routine
> ENTRY(__delay)
> +#if defined(CONFIG_CPU_V6) && defined(CONFIG_SMP)
> + nop
> +#endif
> subs r0, r0, #1
> #if 0
> movls pc, lr
>
> Any ideas what might happen here?
Branch (mis-)prediction? Alignment?
It doesn't really matter, bogomips should not be used as some form of
performance checking.
BTW, local timers give a more accurate estimate of the CPU frequency
(they are counting at half this frequency).
--
Catalin
More information about the linux-arm-kernel
mailing list