Re: Small patch for 2.1.126: TSC counter in /proc/cpuinfo

Rafael Reilova (rreilova@ececs.uc.edu)
Mon, 19 Oct 1998 15:11:43 -0400 (EDT)


On Mon, 19 Oct 1998, Alberto Vignani wrote:

> So I propose this simple patch to replace the really unuseful bogomips
> value with the TSC calculated frequency. However, should some program
> use the bogomips value from /proc/cpuinfo (why?), the TSC could be just
> added to the end instead of replacing bogomips.
>
> + if (c->x86_capability & X86_FEATURE_TSC) {
> + p += sprintf(p, "\ncpu_hz\t\t: %lu\n\n", cpu_hz);
> + }

Wouldn't it make more sense to print it out in MHz, perhaps something
like:

p += sprintf(p, "\ncpu MHz\t\t: %lu.%02lu\n\n",
cpu_hz / 1000000, (cpu_hz % 1000000) / 10000);

Cheers,

Rafael

PS. The Jumbo patch for 2.0.x has been doing this for some time now.
Although Andre Balsa decided to append the MHz rating to the model string.

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