Hello !
BogoMips is most useful as a benchmark, if the main purpose of your
machine is to calculate BogoMips' ... (see BogoMips Mini-HOWTO :))
However - since there seems to be such a strong desire to see large
BogoMips values - here is some help:
Your BogoMips factor of 0.66, instead of the usual 0.99..., indicates
that the delay loop is misaligned, i.e. there's a instruction-cache-block
boundary inmidst the loop. (Recently i managed somehow to achieve this on
a R10000 :)
A ".align 3\n\t" at the begin of __delay() will keep the branch and its
delay-slot together.
You should even be able to double the BogoMips value (factor 1.99...) by
unrolling the delay loop (at least on R10k):
static __inline__ void
__delay(unsigned long loops)
{
loops |= 1;
__asm__ __volatile__ (
".align 4\n\t" /* only the paranoid survive. */
".set\tnoreorder\n"
"1:\n\t"
"dsubu\t%0,1\n\t"
"bnez\t%0,1b\n\t"
"dsubu\t%0,1\n\t"
".set\treorder"
:"=r" (loops)
:"0" (loops));
}
Nevertheless, despite all this trickery, your machine will run exactly
as fast (slow), as it did before.
with kind regards
pf
"I have been a happy man ever since January 1, 1990, when I no longer
had an email address. ..."
Donald E. Knuth
(http://www-cs-faculty.stanford.edu/~knuth/email.html)
On Sat, 13 Nov 2004, macrohat wrote:
> Date: Sat, 13 Nov 2004 21:47:02 +0800
> From: macrohat <emblinux@macrohat.com>
> To: linux-mips <linux-mips@linux-mips.org>
> Cc: linux-cvs <linux-cvs@linux-mips.org>
>
> Hello linux-mips:
>
> I have a question to ask you: why BCM1250 CPU Bogomips is so much lower than
> CPU clock frequency,such as:
> CPU 700MHz - 465.30 Bogomips, CPU 800MHZ - 532.48 BogoMIPS.And i find out
> that CPU Bogomips is a fixed value regardless L2 cache open or closed,
>
> Enclosed is the log from the console
>
> Regards!
>
>
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡macrohat
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡emblinux@macrohat.com
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-11-13
>
|