Re: BogoMIPS

Richard B. Johnson (root@chaos.analogic.com)
Wed, 30 Sep 1998 16:56:56 -0400 (EDT)


On Wed, 30 Sep 1998, John Alvord wrote:

> On Wed, 30 Sep 1998, Richard B. Johnson wrote:
>
> >
> > Don't forget the reason for this. The reason was to eliminate getting
> > a different BogoMIPS reading when the kernel is rebuilt.
> >
> This will reduce the number of questions
>

For hackers... a piece of test-code that does the same thing without
using the two jumps.

#include <stdio.h>

void delay(unsigned long loops)
{
__asm__ __volatile__(
"\tpushl %%cs\n"
"\tpushl $doit\n"
"\t.byte 0xcb\n"
".align 16\n"
"doit:\tdecl %0\n\tjns doit"
:/* no outputs */
:"a" (loops)
:"ax");
}

main()
{
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
delay(0xffffffff);
return 0;
}

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.123 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

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