Re: BogoMIPS doubling...

From: Andrew Morton (andrewm@uow.edu.au)
Date: Sun Apr 02 2000 - 18:31:46 EST


Daniel J Blueman wrote:
>
> Surely though, being 2x out would not be good for lots of user-land apps
> using this as a {rough, simply} processor power measurement.

This is basically the same discussion as we had a week ago (Subject:
bogo-bogomips)

If the machine has a TSC then the bogomips figure is doubled because it
counts TSC increments per second, not little-loops per second.

There are a number of drivers which do things like:

  __delay(1000);

This is bad, because Mr Moore is making that delay 30% shorter per year,
and Alan's change has added two years in one hit. One day they will
fail mysteriously. These functions should be using udelay().

Also, there are some drivers which do things like:

        int foo = loops_per_sec * scaling_factor;

        while (foo--)
        {
                if (device_ready)
                        break;
        }

which is also broken because it assumes a reasonably constant
relationship between the execution time of this loop and the execution
time of the loops_per_sec calculation loop. Alan's change has
invalidated this assumption and these loops are now doubled in time, for
machines which support TSC.

-- 
-akpm-

- 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/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:09 EST