Re: /proc/cpuinfo format - arch dependent!
From: Lennart Sorensen
Date: Tue Apr 19 2005 - 15:13:09 EST
On Tue, Apr 19, 2005 at 10:00:12PM +0200, Nico Schottelius wrote:
> Can you tell me which ones?
top for example would probably break. Maybe not but I suspect it would.
mplayer probably would since it uses it to find the cpu type and
features that cpu supports.
> And if there are really that many tools, which are dependent on
> those information, wouldn't it be much more senseful to make
> it (as far as possible) the same?
Well the tools that care are often architecture specific. After all the
info in cpuinfo is very architecture specific.
> I must say I was really impressed, how easy I got the number of
> cpus on *BSD (I am not a bsd user, still impressed).
Well there still is that sysconf call to get the number of cpus, which
is way better in C than parsing a text file to get the info as far as I
am concerned.
> They also have the same format on every arch and mostly the same
> between different bsds (as far as I have seen).
What info do they provide in that on BSD?
> In general, where are the advantages of having very different cpuinfo
> formats? Tools would need to know less about the arch and could
> depend on "I am on Linux" only.
The info in cpuinfo is only of interest to a tool that knows about the
architecture it is on.
It is not meant to look up the number of cpus the system has. It is
meant to provide the info about the cpus in the system, which means it
provides info relevant to the cpu on a given architecture.
Len Sorensen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/