Re: BogoMIPS

H. Peter Anvin (hpa@transmeta.com)
30 Sep 1998 04:20:12 GMT


Followup to: <Pine.LNX.3.96.980928175921.21408A-100000@penguin.transmeta.com>
By author: Linus Torvalds <torvalds@transmeta.com>
In newsgroup: linux.dev.kernel
>
>
>
> On Mon, 28 Sep 1998, Richard B. Johnson wrote:
> >
> > Hmmm. It certainly helps here! It also has helped others who complained!
>
> I did the same thing for 2.0.x a long time ago. It helped for certain
> chips, but it still jittered for others. And it depended on how the kernel
> got compiled - there was one (German?) person in particular who took the
> bogomips loop into user code and tried it with tons of different
> placements, and showed that for his CPU it made a difference how it was
> placed and what the surrounding code was.
>
> As a result, 2.0.x just does it as a separate subroutine in
>
> arch/i386/lib/delay.S
>
> and that pretty much forces it to not jitter at all. If you'd send me that
> kind of patch I'd accept it.
>
> Linus
>

I think the right thing is to use the TSC if the machine has one
(which can be trusted.) That leaves only older, simple machines to
use timing loops.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/