From: Mike Travis <travis@sgi.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: num_possible_cpus() giving more than possible.
Date: Fri, 26 Sep 2008 16:09:48 -0700 [thread overview]
Message-ID: <48DD6BBC.4000402@sgi.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0809261613070.21618@gandalf.stny.rr.com>
Steven Rostedt wrote:
> Hi Mike,
>
> Peter told me that I should report this to you. I have two socket
> single core hyper threaded box (must be hell). Peter told me that the
> num_possible_cpus() should return the number possible on this box. The
> explanation of my box tells us it should be 4. But it in fact returns 8.
It looks like the APIC discovery code is finding 2 dual cores w/HT. I'm
no expert in how all this works but it's assigning
proc 0/2 --> phys id 0 w/2 HT
proc 1/3 --> phys id 3 w/2 HT
Either the BIOS on your machine is confusing the APIC code, the APIC code
has a bug, or you've found an Easter egg... ;-)
>
> nr_cpu_ids also returns 8.
Yes, this reflects the number of possible cpus if all were enabled. On
our systems, we can designate a number of cores to be "present" but
"disabled". Perhaps a "low bin" cpu is basically a dual core with the
non-working core disabled, but still accounted for in the BIOS APIC
tables?
Cheers,
Mike
>
> here's the /proc/cpuinfo:
>
> processor : 0
.
> physical id : 0
> siblings : 2
> core id : 0
> cpu cores : 1
> apicid : 0
> initial apicid : 0
.
>
> processor : 1
.
> physical id : 3
> siblings : 2
> core id : 0
> cpu cores : 1
> apicid : 6
> initial apicid : 6
.
>
> processor : 2
.
> physical id : 0
> siblings : 2
> core id : 0
> cpu cores : 1
> apicid : 1
> initial apicid : 1
.
>
> processor : 3
.
> physical id : 3
> siblings : 2
> core id : 0
> cpu cores : 1
> apicid : 7
> initial apicid : 7
.
> Perhaps since my physical ids show 0 and 3, it thinks it can also have
> a 1 and 2?
>
> Thanks,
>
> -- Steve
>
>
prev parent reply other threads:[~2008-09-26 23:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 20:22 num_possible_cpus() giving more than possible Steven Rostedt
2008-09-26 23:09 ` Mike Travis [this message]
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=48DD6BBC.4000402@sgi.com \
--to=travis@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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 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.