From: Andreas Herrmann <andreas.herrmann3@amd.com>
To: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 0/3 v2] x86: adapt CPU topology detection for AMD Magny-Cours
Date: Fri, 29 May 2009 20:40:23 +0200 [thread overview]
Message-ID: <20090529184023.GD23770@alberich.amd.com> (raw)
Hi,
Second attempt to fix CPU topology representation for multi-node
processors.
Using topology information from /sys/devices/system/cpu/cpu*/topology
you can identify
phys_package by physical_package_id
core by core_id + physical_package_id
Corresponding sibling information is
Level | Set of CPUs
--------------|---------------
phys_package | core_siblings
core | thread_siblings
thread | one CPU
Example:
cpu19: physical_package_id : 1
cpu19: core_id : 7
cpu19: thread_siblings : 00080000
cpu19: thread_siblings_list : 19
cpu19: core_siblings : 00fff000
cpu19: core_siblings_list : 12-23
I am adding cpu_node_id, cpu_node_siblings, cpu_node_siblings_list
to get the complete hierarchy. Now you can identify
phys_package by physical_package_id
cpu_node by physical_package_id + cpu_node_id
core by physical_package_id + cpu_node_id + core_id
In contrast to first patch set I don't change the meaning of
core_siblings. Thus we have following sets of CPUs on a socket
Level | Set of CPUs
--------------|---------------
phys_package | core_siblings
cpu_node | cpu_node_siblings
core | thread_siblings
thread | one CPU
Example:
cpu19: physical_package_id : 1
cpu19: core_id : 1
cpu19: thread_siblings : 00080000
cpu19: thread_siblings_list : 19
cpu19: cpu_node_id : 0
cpu19: cpu_node_siblings : 00fc0000
cpu19: cpu_node_siblings_list : 18-23
cpu19: core_siblings : 00fff000
cpu19: core_siblings_list : 12-23
The cpu_node level information is stored in struct cpuinfo_x86.cpu_node_id
and in cpu_node_map. It can be accessed using topology_cpu_node_id(cpu)
and topology_cpu_node_cpumask(cpu).
Note:
A cpu_node is a functional unit. In case of AMD Magny-Cours it
contains a number of cores, configuration registers, memory
controler, ... A cpu_node is _not_ necessarily a NUMA node.
If you doubt this. Think of node interleaving where strictly speaking
you have no NUMA but spread memory accesses across all nodes
(depending on some bits of the memory address). The NUMA node
topology is provided via ACPI tables (e.g. SRAT, SLIT). The contents
of such tables might vary with different BIOS settings - the CPU
topology is constant.
Patches are against tip/master.
Please apply.
Thanks,
Andreas
--
Operating | Advanced Micro Devices GmbH
System | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
(OSRC) | Registergericht München, HRB Nr. 43632
next reply other threads:[~2009-05-29 18:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 18:40 Andreas Herrmann [this message]
2009-05-29 18:42 ` [PATCH 1/3] x86: provide CPU topology information for multi-node processors Andreas Herrmann
2009-06-02 15:05 ` Bert Wesarg
2009-06-02 15:58 ` Andreas Herrmann
2009-06-02 16:19 ` Bert Wesarg
2009-05-29 18:48 ` [PATCH 2/3] x86: add topology detection for AMD " Andreas Herrmann
2009-05-29 18:49 ` [PATCH 3/3] x86: cacheinfo: fixup L3 cache information " Andreas Herrmann
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=20090529184023.GD23770@alberich.amd.com \
--to=andreas.herrmann3@amd.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox