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-next>] [day] [month] [year] [list]
Date:	Fri, 29 May 2009 20:40:23 +0200
From:	Andreas Herrmann <andreas.herrmann3@....com>
To:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH 0/3 v2] x86: adapt CPU topology detection for AMD
	Magny-Cours

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


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