From: Bill Davidsen <davidsen@tmr.com>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: "J.A. Magallon" <jamagallon@able.es>,
Dan Maas <dmaas@maasdigital.com>,
linux-kernel@vger.kernel.org, tmv@comcast.net
Subject: Re: Distinguish real vs. virtual CPUs?
Date: Tue, 22 Mar 2005 16:26:47 -0500 [thread overview]
Message-ID: <42408D97.7000806@tmr.com> (raw)
In-Reply-To: <88056F38E9E48644A0F562A38C64FB600448EE27@scsmsx403.amr.corp.intel.com>
Pallipadi, Venkatesh wrote:
>
>
>
>>This is 2xXeonHT, is, 4 cpus on 2 packages:
>>
>>cat /proc/cpuinfo:
>>
>>processor : 0
>>...
>>physical id : 0
>>siblings : 2
>>core id : 0
>>cpu cores : 1
>>
>>processor : 1
>>...
>>physical id : 0
>>siblings : 2
>>core id : 0
>>cpu cores : 1
>>
>>processor : 2
>>...
>>physical id : 3
>>siblings : 2
>>core id : 3
>>cpu cores : 1
>>
>>processor : 3
>>...
>>physical id : 3
>>siblings : 2
>>core id : 3
>>cpu cores : 1
>>
>>So something like:
>>
>>cat /proc/cpuinfo | grep 'core id' | uniq | wc -l
>>
>>would give you the number of packages or 'real cpus'. Then you have to
>>choose which ones are unrelated. Usually evens are siblings of
>>odds, but
>>I won't trust on it...
>>
>
>
> Number of unique physical id will tell you the number of physical CPU
> packages in the system.
For some Intel processors... Tom Vier just posted his cpuinfo which
shows all of his processors, which he notes are in separate sockets, are
identified as physical zero. I didn't find any Intel systems which
lacked unique physical ID, but clearly that's not true everywhere.
It's not clear if that's bizarre practice on AMD system boards or if
it's mis-reported. Of course Tom may be running a NUMA setup, in which
case I won't guess what's expected to be displayed. I've added him to
the CC list, in hopes of comment.
> Number of unique core id will tell you the total number of CPU cores in
> the system.
> Number of processor will tell you the total number of logical CPUs on
> the system.
>
> Then to find out the matching pairs,
> - to pair up all HT siblings on a core: Processors that have same "core
> id" are HT siblings in a core.
> - to pair up all CPUs in a package: Processors that have same "physical
> id" are all the CPUs belonging to the same physical package.
--
-bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
next prev parent reply other threads:[~2005-03-22 21:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 4:29 Distinguish real vs. virtual CPUs? Pallipadi, Venkatesh
2005-03-22 21:26 ` Bill Davidsen [this message]
2005-03-22 21:38 ` Jan Engelhardt
2005-03-23 17:52 ` Tom Vier
2005-03-23 21:32 ` Bill Davidsen
-- strict thread matches above, loose matches on Subject: below --
2005-03-22 1:27 Dan Maas
2005-03-22 1:56 ` Dave Jones
2005-03-22 11:55 ` Dr. David Alan Gilbert
2005-03-22 2:01 ` Daniel Andersen
2005-03-22 2:12 ` J.A. Magallon
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=42408D97.7000806@tmr.com \
--to=davidsen@tmr.com \
--cc=dmaas@maasdigital.com \
--cc=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.org \
--cc=tmv@comcast.net \
--cc=venkatesh.pallipadi@intel.com \
/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