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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 7 Mar 2016 20:22:20 +0100
From:	Robert Richter <robert.richter@...iumnetworks.com>
To:	David Daney <ddaney.cavm@...il.com>
CC:	Will Deacon <will.deacon@....com>,
	<linux-arm-kernel@...ts.infradead.org>,
	Rob Herring <robh+dt@...nel.org>,
	Frank Rowand <frowand.list@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Ganapatrao Kulkarni <gkulkarni@...iumnetworks.com>,
	Ard Biesheuvel <ard.biesheuvel@...aro.org>,
	Matt Fleming <matt@...eblueprint.co.uk>,
	Mark Rutland <mark.rutland@....com>,
	Catalin Marinas <catalin.marinas@....com>,
	<linux-efi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<devicetree@...r.kernel.org>, David Daney <david.daney@...ium.com>
Subject: Re: [PATCH v14 2/6] Documentation, dt, numa: dt bindings for NUMA.

On 03.03.16 15:55:35, David Daney wrote:
> From: Ganapatrao Kulkarni <gkulkarni@...iumnetworks.com>
> 
> Add DT bindings for numa mapping of memory, CPUs and IOs.
> 
> Reviewed-by: Robert Richter <rrichter@...ium.com>
> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@...iumnetworks.com>
> Signed-off-by: David Daney <david.daney@...ium.com>
> ---
>  Documentation/devicetree/bindings/numa.txt | 272 +++++++++++++++++++++++++++++
>  1 file changed, 272 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/numa.txt
> 
> diff --git a/Documentation/devicetree/bindings/numa.txt b/Documentation/devicetree/bindings/numa.txt
> new file mode 100644
> index 0000000..ec5ed7c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/numa.txt

> +==============================================================================
> +3 - distance-map
> +==============================================================================
> +
> +The device tree node distance-map describes the relative
> +distance (memory latency) between all numa nodes.
> +
> +- compatible : Should at least contain "numa-distance-map-v1".
> +
> +- distance-matrix
> +  This property defines a matrix to describe the relative distances
> +  between all numa nodes.
> +  It is represented as a list of node pairs and their relative distance.
> +
> +  Note:
> +	1. Each entry represents distance from first node to second node.
> +	The distances are equal in either direction.
> +	2. The distance from a node to self (local distance) is represented
> +	with value 10 and all internode distance should be represented with
> +	a value greater than 10.
> +	3. distance-matrix should have entries in lexicographical ascending
> +	order of nodes.
> +	4. There must be only one device node distance-map which must reside in the root node.

There is no note that this one is optional, but is it right? The
default is 10 for local and 20 for remote connections.

If so, then ...

static int __init of_numa_parse_distance_map(void)
{
	int ret = -EINVAL;
	struct device_node *np = of_find_node_by_path("/distance-map");

	if (!np)
		return ret;

must return 0 instead of -EINVAL here.

-Robert

> +
> +Example:
> +	4 nodes connected in mesh/ring topology as below,
> +
> +		0_______20______1
> +		|               |
> +		|               |
> +		20             20
> +		|               |
> +		|               |
> +		|_______________|
> +		3       20      2
> +
> +	if relative distance for each hop is 20,
> +	then internode distance would be,
> +	      0 -> 1 = 20
> +	      1 -> 2 = 20
> +	      2 -> 3 = 20
> +	      3 -> 0 = 20
> +	      0 -> 2 = 40
> +	      1 -> 3 = 40
> +
> +     and dt presentation for this distance matrix is,
> +
> +		distance-map {
> +			 compatible = "numa-distance-map-v1";
> +			 distance-matrix = <0 0  10>,
> +					   <0 1  20>,
> +					   <0 2  40>,
> +					   <0 3  20>,
> +					   <1 0  20>,
> +					   <1 1  10>,
> +					   <1 2  20>,
> +					   <1 3  40>,
> +					   <2 0  40>,
> +					   <2 1  20>,
> +					   <2 2  10>,
> +					   <2 3  20>,
> +					   <3 0  20>,
> +					   <3 1  40>,
> +					   <3 2  20>,
> +					   <3 3  10>;
> +		};

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ