Re: 8.1-PRERELEASE: CPU packages not detected correctly




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)
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: What are the CPU-internal characteristics of CAS collision?
    ... That's correct, if you've got two threads on a single core, or two cores ... sharing a cache. ... When a core completes a CAS, in x86/x64, there's always a write to ... memory, so even when the CAS isn't equal, the memory write and cache ...
    (comp.programming.threads)
  • Re: new Itanium after Tukwila: Poulson
    ... >> Tukwila, perhaps IDF will give some light on it. ... > significant core changes appear in Montvale or Tukwila I'll be at ... The L3 cache helped atleast much in SpecFP, ... > small amounts of ultimate single-thread performance to allow them to ...
    (comp.os.vms)
  • Re: new Itanium after Tukwila: Poulson
    ... > Tukwila, perhaps IDF will give some light on it. ... significant core changes appear in Montvale or Tukwila I'll be at least ... MB of on-chip cache) slightly in SPECint (yes, ... complex due to its support for single-thread performance, ...
    (comp.os.vms)
  • Re: [RFT][patch] Scheduling for HTT and not only
    ... I've decided to stop those cache black magic practices and focus on ... This patch adds check to skip fast previous CPU selection if it's SMT ... That makes pickcputo prefer previous core or it's ...
    (freebsd-hackers)
  • Re: Dell vs. eMachines T6420
    ... I still maintain that Intel "Core Duo" chips are multicore, ... Allowing communication across the L2 cache limits the use ... Intel itself has admitted several things about its "Core Duo" philosophy: ... cannot see or communicate with each other...Intel itself admits it does ...
    (alt.sys.pc-clone.dell)