ARM11 MPCore: Adding nop to __delay() doubles the BogoMIPS/lpj

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Jan 29 10:26:17 EST 2010


On Fri, Jan 29, 2010 at 03:17:59PM -0000, Leif Lindholm wrote:
> > -----Original Message-----
> > From: Uwe Kleine-König [mailto:u.kleine-koenig at pengutronix.de]
> > Sent: 29 January 2010 14:54
> 
> > > But as Catalin says, this makes no functional difference, even though
> > > it might look "more impressive" :)
> >
> > With a bigger number of loops_per_seconds the maximal period that can
> > be delayed for is shorter and the granularity is better, no?
> 
> I concur that this aspect of my comment was technically incorrect - but if
> your code was depending on either of those, surely that would be a problem
> in itself?
> 
> The minimum time would be questionable anyway, as loops_per_second is an
> average, and the branch predictor is fairly likely to miss on the first time
> through the loop unless your code uses a lot of delays.

Not only that, but it takes a certain number of cycles to calculate the
number of loops for any given delay; the smaller the delay the more
significant that is.  For very short delays (eg, one loop) that it
swamps the loop itself.



More information about the linux-arm-kernel mailing list