udelay problems: a proposal

Martin Mares (mj@mj.gts.cz)
Thu, 6 Nov 1997 22:21:33 +0100


Hi,

After playing with various patches for speeding up Linux on Cyrix and AMD
processors, I've also found several fixes for the udelay problems mentioned
on the kernel list some months ago (the main source of these problems was
different alignment of delay loops on different places).

I propose to make udelay a non-inline function and align it on 32-byte
boundary (which is generally unwise when making it inline). This should
kill all dependencies of delay on code placement (including differences
between delay function used during calibration and the actual udelay's)
and also makes possible using Pentium cycle counters for more precise timing.

Are there any objections against this approach?

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@gts.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"ADA -- A Dumb Acronym"