Re: /proc/cpuinfo verbiage differ unnecessarily between ports...

Jes Sorensen (Jes.Sorensen@cern.ch)
02 Sep 1999 10:56:05 +0200


>>>>> "Phillip" == Phillip Ezolt <ezolt@perf.zko.dec.com> writes:

Phillip> This is not true. There are REAL uses for the call. I am
Phillip> currently porting an application from Tru64 with behavior
Phillip> that depends on the number of CPUs in the system. (For
Phillip> example, How many buffers should I allocate?)

Phillip> Sure. I can write some code to parse /proc/stat or
Phillip> /proc/cpuinfo. Tru64 has the sysconf(_SC_NPROCESSORS_CONF)
Phillip> call, and it would be nice if Linux did the same.
Phillip> (especially since /proc/ has been known to change...)

Andreas already suggested extending sysinfo() to cover this. As I
mentioned earlier, the only real argument so far has been the number
of CPUs (and maybe the FPU type for cases like the m68k).

Phillip> Why not have both? Keep /proc/cpuinfo for the perl script,
Phillip> but use sysconf(_SC_NPROCESSORS_CONF) for the libraries.
Phillip> Plus, what if people don't compile with /proc?

Compiling Linux to not use /proc is pretty much going to render your
system useless.

Jes

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