From: "Dr. David Alan Gilbert" <gilbertd@treblig.org>
To: Dave Jones <davej@redhat.com>, Dan Maas <dmaas@maasdigital.com>,
linux-kernel@vger.kernel.org
Subject: Re: Distinguish real vs. virtual CPUs?
Date: Tue, 22 Mar 2005 11:55:22 +0000 [thread overview]
Message-ID: <20050322115522.GN1450@gallifrey> (raw)
In-Reply-To: <20050322015603.GB19541@redhat.com>
* Dave Jones (davej@redhat.com) wrote:
> Compare the 'physical id' fields of /proc/cpuinfo, and count
> how many unique values you get.
> Ie, on my dual+ht, I see..
>
> physical id : 0
> physical id : 0
> physical id : 3
> physical id : 3
>
> Which indicates 2 real CPUs split in two.
Is this guarenteed to be safe on all architectures? Parsing
/proc/cpuinfo accross different architectures can be a bit hairy;
I'm thinking when non-x86 start to have multiple hardware threads
people might want to do the same thing.
Dave
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
next prev parent reply other threads:[~2005-03-22 11:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 1:27 Distinguish real vs. virtual CPUs? Dan Maas
2005-03-22 1:56 ` Dave Jones
2005-03-22 11:55 ` Dr. David Alan Gilbert [this message]
2005-03-22 15:02 ` not for amd " Tom Vier
2005-03-22 2:01 ` Daniel Andersen
2005-03-22 2:12 ` J.A. Magallon
-- strict thread matches above, loose matches on Subject: below --
2005-03-22 4:29 Pallipadi, Venkatesh
2005-03-22 21:26 ` Bill Davidsen
2005-03-22 21:38 ` Jan Engelhardt
2005-03-23 17:52 ` Tom Vier
2005-03-23 21:32 ` Bill Davidsen
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=20050322115522.GN1450@gallifrey \
--to=gilbertd@treblig.org \
--cc=davej@redhat.com \
--cc=dmaas@maasdigital.com \
--cc=linux-kernel@vger.kernel.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