From owner-freebsd-stable@FreeBSD.ORG Thu Jul 15 11:58:36 2010 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58C881065670 for ; Thu, 15 Jul 2010 11:58:36 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id CB2A48FC15 for ; Thu, 15 Jul 2010 11:58:35 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o6FBwJ7F066824; Thu, 15 Jul 2010 13:58:34 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o6FBwJI8066822; Thu, 15 Jul 2010 13:58:19 +0200 (CEST) (envelope-from olli) From: Oliver Fromme Message-Id: <201007151158.o6FBwJI8066822@lurza.secnetix.de> To: avg@icyb.net.ua (Andriy Gapon) Date: Thu, 15 Jul 2010 13:58:19 +0200 (CEST) In-Reply-To: <4C3DF48E.1070502@icyb.net.ua> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.4 (lurza.secnetix.de [127.0.0.1]); Thu, 15 Jul 2010 13:58:34 +0200 (CEST) Cc: freebsd-stable@FreeBSD.ORG Subject: Re: 8.1-PRERELEASE: CPU packages not detected correctly X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 11:58:36 -0000 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)