From: Stefan Smietanowski <stesmi@stesmi.com>
To: Ricky Beam <jfbeam@bluetronic.net>
Cc: Nico Schottelius <nico-kernel@schottelius.org>,
linux-kernel@vger.kernel.org
Subject: Re: /proc/cpuinfo format - arch dependent!
Date: Sat, 07 May 2005 06:01:14 +0200 [thread overview]
Message-ID: <427C3D8A.9080600@stesmi.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0505062324550.1894-100000@sweetums.bluetronic.net>
-----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-----
next prev parent reply other threads:[~2005-05-07 3:58 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-19 12:15 /proc/cpuinfo format - arch dependent! Nico Schottelius
2005-04-19 13:24 ` Lennart Sorensen
2005-04-19 19:17 ` Lee Revell
2005-04-19 20:00 ` Nico Schottelius
2005-04-19 20:02 ` David S. Miller
2005-04-19 20:12 ` Lennart Sorensen
2005-04-19 20:42 ` Lee Revell
2005-04-19 20:54 ` Nico Schottelius
2005-04-19 21:12 ` Grzegorz Kulewski
2005-04-20 20:31 ` Ralf Baechle
2005-05-07 3:37 ` Ricky Beam
2005-05-07 4:01 ` Stefan Smietanowski [this message]
2005-05-07 7:55 ` Ricky Beam
2005-05-07 17:51 ` Stefan Smietanowski
2005-05-07 18:05 ` Ricky Beam
2005-05-07 18:46 ` Dr. David Alan Gilbert
2005-05-07 4:14 ` Andrew Morton
2005-05-07 7:58 ` Willy Tarreau
2005-05-07 16:53 ` Dave Jones
2005-05-07 17:05 ` Willy Tarreau
2005-05-07 17:20 ` Dave Jones
2005-05-07 17:18 ` Willy Tarreau
2005-05-08 1:25 ` Jim Nance
2005-05-08 16:11 ` John Kacur
2005-05-09 18:14 ` Bill Davidsen
2005-05-09 20:09 ` Chris Friesen
2005-05-09 20:26 ` Lennart Sorensen
2005-05-09 21:25 ` Brian O'Mahoney
2005-05-10 16:21 ` Bill Davidsen
2005-05-10 16:34 ` Chris Friesen
2005-05-10 2:23 ` Jim Nance
2005-05-10 4:12 ` Willy Tarreau
2005-05-10 7:13 ` Paul Jackson
2005-05-10 16:34 ` Bill Davidsen
2005-05-07 17:54 ` Stefan Smietanowski
2005-05-07 18:05 ` Willy Tarreau
2005-05-09 18:03 ` Bill Davidsen
2005-05-10 7:21 ` Paul Jackson
2005-05-10 14:38 ` Lennart Sorensen
2005-05-10 16:37 ` Bill Davidsen
2005-05-09 18:00 ` Bill Davidsen
2005-05-09 19:58 ` Lennart Sorensen
2005-05-10 16:49 ` Bill Davidsen
[not found] <3UZS7-5ue-17@gated-at.bofh.it>
[not found] ` <41ouh-4QE-1@gated-at.bofh.it>
[not found] ` <41oXl-5hl-7@gated-at.bofh.it>
[not found] ` <41sxX-8cN-11@gated-at.bofh.it>
[not found] ` <41BL4-7l7-15@gated-at.bofh.it>
2005-05-07 23:33 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-05-08 13:24 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=427C3D8A.9080600@stesmi.com \
--to=stesmi@stesmi.com \
--cc=jfbeam@bluetronic.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nico-kernel@schottelius.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).