lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48DD6BBC.4000402@sgi.com>
Date:	Fri, 26 Sep 2008 16:09:48 -0700
From:	Mike Travis <travis@....com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: num_possible_cpus() giving more than possible.

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
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ