lkml.org 
[lkml]   [2005]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: /proc/cpuinfo format - arch dependent!
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>When I wrote schwanz3(*) for fun, I noticed /proc/cpuinfo
>>varies very much on different architectures.
>
> Yep, and it has been this way since the begining of time.
>
>>So that one at least can count the cpus on every system the same way.
>
> Hah. Give me a minute to stop laughing... I argued the same point almost
> a decade ago. Linus decided to be an ass and flat refused to ever export
> numcpu (or any of the current day derivatives) which brought us to the
> bullshit of parsing the arch dependant /proc/cpuinfo.

Hey Ricky.

Not to be a pain but how exactly would that interface look today
in your eyes?

Single AthlonXP system - 1 cpu right?
Dual Opteron - 2 cpu right?

Now come the interesting things :

Single P4 w/ HT enabled - 1 or 2?

even more interesting :

DualCore P4 w/ HT disabled - 1 or 2 ?

And to top it off :

DualCore P4 w/ HT enabled - 1, 2 or 4 ?

Show me a scalable interface that can account
for all cases here.

One software might want to count each virtual
CPU as 1 hence the DC P4 w/ HT it would want
to count as 4.
Another software might want to only count
the cores, hence count them as 2.
Yet another software might want to count it as
1.

Then of course we might have a system with 4
DualCore whatever with HT with 4 CPU boards
in some kind of NUMA. Do you want to count
4 CPU's (4 boards) or do you want 16 CPU's
(4 boards * 4 CPU's per board) or 32 CPU's
(4 boards * 4 CPU's per board * 2 cores per CPU)
or .. or .. or ..

It quickly gets out of hand.

And everybody will want to count it differently.

If you set a standard "only count physical CPUs"
then the next guy will think differently.

Same as if you set the standard to "only count
physical cores".

Today we have dualcore, HT, other kinds of SMT, etc,
add multiple CPU's per board in a NUMA or some kind
of clustering ...

So yes, I do agree that it would be good to have an
easy way to get it but the question is .. what is
a person after..

// Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFCfD2KBrn2kJu9P78RAr5sAKC4StnvHWvKvf2IljbEhHDpEDs11ACgiy4W
RCa9q9OanAS0LcYhdnz3TE0=
=g0Y7
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-07 06:01    [W:0.171 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site