From: David T Hollis <dhollis@davehollis.com>
To: chrisl@vmware.com
Cc: "Martin J. Bligh" <mbligh@aracnet.com>, linux-kernel@vger.kernel.org
Subject: Re: How to get number of physical CPU in linux from user space?
Date: Fri, 25 Oct 2002 14:35:10 -0400 [thread overview]
Message-ID: <3DB98EDE.6020808@davehollis.com> (raw)
In-Reply-To: 20021025182023.GA1397@vmware.com
chrisl@vmware.com wrote:
>On Fri, Oct 25, 2002 at 01:27:00AM -0700, Martin J. Bligh wrote:
>
>
>>Define "physical CPU number" ;-) If you want to deteact which
>>
>>
>
>I mean the number of cpu chip you can count on the mother board.
>
>
>
>>ones are paired up, I believe that if all but the last bit
>>of the apicid is the same, they're siblings. You might have to
>>dig the apicid out of the bootlog if the cpuinfo stuff doesn't
>>tell you.
>>
>>
>
>And you are right. Those apicid, after mask out the siblings,
>are put in phys_cpu_id[] array in kernel.
>
>I think about look at bootlog too, but that is not a reliable
>way because bootlog might already been flush out after some
>time.
>
>Cheers
>
>Chris
>
>
>
>-
>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/
>
>
Here is what RedHat does in some of their SRPMS to check if you have
multiple CPUs on your build machine so they can do some parallel builds
to speed up the build process (kernel, glibc, etc):
egrep -c "^cpu[0-9]+" /proc/stat || :
next prev parent reply other threads:[~2002-10-25 18:31 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 [this message]
2002-10-25 18:52 ` Martin J. Bligh
2002-10-25 12:38 ` Dave Jones
2002-10-25 19:07 ` chrisl
-- 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=3DB98EDE.6020808@davehollis.com \
--to=dhollis@davehollis.com \
--cc=chrisl@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.