Re: [PATCH 0/5 v4] x86: Adapt CPU topology detection for AMDMagny-Cours

From: Andreas Herrmann
Date: Thu Aug 06 2009 - 12:09:04 EST


On Thu, Aug 06, 2009 at 02:25:19PM +0200, Brice Goglin wrote:
> Andreas Herrmann wrote:
> > Of course I thought also to implement it this way because it looks
> > more consistent, but IMHO the patches are less intrusive if this
> > scheme is _not_ used. Instead I kept core_siblings as is ("for
> > historic reasons", nobody needs to accustom to new semantics). And use
> > cpu_node_siblings where it really matters.
> >
>
> Well, core_siblings and cpu_node_sibling will only be different on
> Magny-Cours anyway. So even if core_siblings becomes "all cores in
> cpu_node" instead of "all cores in socket", it won't actually break any
> existing setup. I personally prefer having the same kind of semantics
> for all foo_siblings rather than having something with a different
> meaning between core and thread.

You just want to have the user interface adapted to your
semantics. I.e. you want to have following attributes:
(from Documentation/cputopology.txt)

1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
represent the physical package id of cpu X;
2) /sys/devices/system/cpu/cpuX/topology/core_id:
represent the cpu core id to cpu X;
3) /sys/devices/system/cpu/cpuX/topology/cpu_node_id:
represent the processor internal node_id to cpu X;
4) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
represent the thread siblings to cpu X in the same core;
5) /sys/devices/system/cpu/cpuX/topology/core_siblings:
represent the thread siblings to cpu X in the same processor internal node;
6) /sys/devices/system/cpu/cpuX/topology/cpu_node_siblings:
represent the thread siblings to cpu X in the same physical package;

Note: In case of multi-node processors (e.g. Magny-Cours) 5 and 6
differ. For all other CPUs 5 and 6 provide similar values and
cpu_node_id is 0.

Ok, I can modify the first two patches accordingly to swap the two
attributes and also provide an update for the documentation file.

(But I will keep the internal identifiers for the cpu_node stuff
as is.)


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/