Re: [RFC PATCH v2 2/4] Documentation: arm64/arm: dt bindings for numa.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thursday 11 December 2014 17:16:35 Hanjun Guo wrote:
> On 2014年12月10日 18:57, Arnd Bergmann wrote:
> > On Wednesday 26 November 2014 17:12:49 Hanjun Guo wrote:
> > The above topology is not easy to represent, but I think it would work
> > like this (ignoring the threads/cores/clusters on the socket, which
> > would also need to be described in a full DT), using multiple logical
> > paths between the nodes:
> >
> > socket 0
> > ibm,associativity = <0 0 0 0>, <1 1 1 0>, <2 2 0 0>,  0 0 0>;
> >
> > socket 1
> > ibm,associativity = <1 1 1 1>, <0 0 0 1>, <2 2 2 1>,  3 1 1>;
> >
> > socket 2
> > ibm,associativity = <2 2 2 2>, <0 0 2 2>, <1 1 1 2>,  3 3 2>;
> >
> > socket 3
> > ibm,associativity =  3 3 3>, <0 3 3 3>, <1 1 3 3>, <2 2 2 3>;
> >
> > This describes four levels or hierarchy, with the lowest level
> > being a single CPU core on one socket, and four paths between
> > the sockets. To compute the associativity between two sockets,
> > you need to look at each combination of paths to find the best
> > match.
> >
> > Comparing sockets 0 and 1, the best matches are <1 1 1 0>
> > with <1 1 1 1>, and <0 0 0 0> with <0 0 0 1>. In each case, the
> > associativity is "3", meaning the first three entries match.
> >
> > Comparing sockets 0 and 3, we have four equally bad matches
> > that each only match in the highest-level domain, e.g. <0 0 0 0>
> > with <0 3 3 3>, so the associativity is only "1", and that means
> > the two nodes are less closely associated than two neighboring
> > ones.
> >
> > With the algorithm that powerpc uses to turn associativity into
> > distance, 2**(numlevels - associativity), this would put the
> > distance of neighboring nodes at "2", and the longest distance
> > at "8".
> 
> Thanks for the explain, I can understand how it works now,
> a bit complicated for me and I think the distance property
> "node-matrix" in Ganapatrao's patch is straight forward,
> what do you think?

I still think we should go the whole way of having something compatible
with the existing bindings, possibly using different property names
if there are objections to using the "ibm," prefix.

The associativity property is more expressive and lets you describe
things that you can't describe with the mem-map/cpu-map properties,
e.g. devices that are part of the NUMA hierarchy but not associated
to exactly one last-level node.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux