From: robert.richter@caviumnetworks.com (Robert Richter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v14 2/6] Documentation, dt, numa: dt bindings for NUMA.
Date: Mon, 7 Mar 2016 20:22:20 +0100 [thread overview]
Message-ID: <20160307192220.GA1535@rric.localdomain> (raw)
In-Reply-To: <1457049339-23351-3-git-send-email-ddaney.cavm@gmail.com>
On 03.03.16 15:55:35, David Daney wrote:
> From: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>
> Add DT bindings for numa mapping of memory, CPUs and IOs.
>
> Reviewed-by: Robert Richter <rrichter@cavium.com>
> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> Signed-off-by: David Daney <david.daney@cavium.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>;
> + };
next prev parent reply other threads:[~2016-03-07 19:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 23:55 [PATCH v14 0/6] arm64, numa: Add numa support for arm64 platforms David Daney
2016-03-03 23:55 ` [PATCH v14 1/6] efi: ARM/arm64: ignore DT memory nodes instead of removing them David Daney
2016-03-03 23:55 ` [PATCH v14 2/6] Documentation, dt, numa: dt bindings for NUMA David Daney
2016-03-04 0:17 ` Rob Herring
2016-03-07 19:22 ` Robert Richter [this message]
2016-03-07 19:47 ` David Daney
2016-03-08 5:01 ` Ganapatrao Kulkarni
2016-03-08 8:34 ` Robert Richter
2016-03-03 23:55 ` [PATCH v14 3/6] of, numa: Add NUMA of binding implementation David Daney
2016-03-04 0:15 ` Rob Herring
2016-03-03 23:55 ` [PATCH v14 4/6] arm64: Move unflatten_device_tree() call earlier David Daney
2016-03-03 23:55 ` [PATCH v14 5/6] arm64, numa: Add NUMA support for arm64 platforms David Daney
2016-03-03 23:55 ` [PATCH v14 6/6] arm64, mm, numa: Add NUMA balancing support for arm64 David Daney
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=20160307192220.GA1535@rric.localdomain \
--to=robert.richter@caviumnetworks.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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