Linux generates a meric of CPU performance as a byproduct of calibrating
a delay loop.
We don't require doing any such thing, and so adding it would be purely
cosmetic.
However, I allege that cosmetic things aren't in and of themselves evil,
so long as
they don't break anything in the process.

I would like to generate a number that will hopefully be reasonably
compatible with
the one Linux spits out. The best method I have come up with is to have
a similar
(the same?) count down loop in assembler. Have it count down from
1,000,000 and
see how much nanotime() has gone by. NANSPERSEC/nansused = bogomips.
A 1 bogomips machine will take an extra second to do this (anything
likely to be
even able to run FreeBSD should exceed 1 BM - yes, ha ha), and a kBM CPU

can do it in 1 ms. Perhaps in the future a prescaler might be required,
but
this whole thing is just really chrome anyway.

Would anyone scream and projectile-vomit if I added this to identcpu.c?

S/MIME Cryptographic Signature

Reply via email to