From: chrisl@vmware.com
To: Dave Jones <davej@codemonkey.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: How to get number of physical CPU in linux from user space?
Date: Fri, 25 Oct 2002 12:07:03 -0700 [thread overview]
Message-ID: <20021025190703.GC1397@vmware.com> (raw)
In-Reply-To: <20021025123857.GA1091@suse.de>
On Fri, Oct 25, 2002 at 01:38:57PM +0100, Dave Jones wrote:
>
> You can perform cpuid instructions in userspace to get the
> number of siblings per physical package.
>
Sure. But the problem is that we don't know for sure how many
of the sibling was enable in the kernel. Kernel support up to
2 siblings right now, but it might be more in later kernel. And
user might turn off sibling in kernel.
So divide the number of cpu in cpuinfo by number of siblings per
physical package do not work reliable.
Any comment to add one entry into /proc/cpuinfo to tell which physical
cpu it belong to? I don't mind submit a patch. It will be something
look like:
processor : 2
physical cpu : 1
Cheers
Chris
next prev parent reply other threads:[~2002-10-25 19:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-24 23:02 How to get number of physical CPU in linux from user space? chrisl
2002-10-25 0:47 ` Andrew Walrond
2002-10-25 8:26 ` Gianni Tedesco
2002-10-25 8:27 ` Martin J. Bligh
2002-10-25 18:20 ` chrisl
2002-10-25 18:35 ` David T Hollis
2002-10-25 18:52 ` Martin J. Bligh
2002-10-25 12:38 ` Dave Jones
2002-10-25 19:07 ` chrisl [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-10-25 18:54 Nakajima, Jun
2002-10-25 19:12 ` chrisl
2002-10-25 19:05 Nakajima, Jun
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=20021025190703.GC1397@vmware.com \
--to=chrisl@vmware.com \
--cc=davej@codemonkey.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).