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

Rafael Reilova (rreilova@ececs.uc.edu)
Tue, 20 Oct 1998 17:29:24 -0400 (EDT)


On Tue, 20 Oct 1998, Alberto Vignani wrote:

> On Mon, 19 Oct 1998 Rafael Reilova <rreilova@ececs.uc.edu> wrote:
>
> >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
> >
> >Wouldn't it make more sense to print it out in MHz, perhaps something
> >like:
>
> The point is not to have a nice visual display but to pass a value to
> user-level programs (dosemu, in my case), so they don't need anymore to
> recalculate the value themselves. As such, it is important to have ALL
> the digits.

OK, I see your point (and I agree -- but see below for a better soln.). I
was thinking more in terms of processor identification: "Hey is this a
P233 or P200 machine?" ...and not to forget the possible confusion to
newbies: My CPU is reported as a 199MHz processor, is it broken?

> Good. We could do the same, it doesn't really matter where the value is
> located in /proc/cpuinfo.
>
> We could reach a compromise this way:
>
> diff -ur linux.126pre2/arch/i386/kernel/setup.c /linux/arch/i386/kernel/setup.c

That's fine. Although perhaps we should start thinking of adding a ioctl
interface to the cpuinfo file for 2.3. That way there is no need to parse
an ever-changing cpuinfo file, the caller would get a nice structure
passed with all the nitty-gritty details. I'll start on this as soon as I
get some spare time.

Cheers,

Rafael

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