8.1-PRERELEASE: CPU packages not detected correctly
Oliver Fromme
olli at lurza.secnetix.de
Thu Jul 15 11:58:36 UTC 2010
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
More information about the freebsd-stable
mailing list