mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Robert Richter <robert.richter@caviumnetworks.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
	Will Deacon <will.deacon@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Grant Likely <grant.likely@linaro.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	<linux-efi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v14 2/6] Documentation, dt, numa: dt bindings for NUMA.
Date: Mon, 7 Mar 2016 11:47:21 -0800	[thread overview]
Message-ID: <56DDDAC9.1010600@caviumnetworks.com> (raw)
In-Reply-To: <20160307192220.GA1535@rric.localdomain>

On 03/07/2016 11:22 AM, Robert Richter wrote:
> 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.
>

Do we need to explicitly state that it is optional?  Many node types are 
optional, and their binding specifications don't really talk about their 
being optional.

If the node is present then it has the meaning specified.

If the node is *not* present, then the special meaning described in the 
bindings document does not apply.

In the case of NUMA, this means that all memory is equally distant (i.e. 
it is *Uniform*), and we are not talking about a *Non* *Uniform* Memory 
Architecture (NUMA) system.


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

No, I don't think doing that would be correct.

If there is no "distance-map", then of_numa_init() returns the error 
code.  This causes the code in arch/arm64/kernel/numa.c to fall back to 
the non-NUMA "dummy_numa" case.

By adding your Reviewed-by: Robert Richter <rrichter@cavium.com> tag to 
patch 5/6, where we select between "real" and "dummy_numa", I had 
assumed that you agreed with this approach.

David Daney

  reply	other threads:[~2016-03-07 19:50 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
2016-03-07 19:47     ` David Daney [this message]
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=56DDDAC9.1010600@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=david.daney@cavium.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=gkulkarni@caviumnetworks.com \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=pawel.moll@arm.com \
    --cc=robert.richter@caviumnetworks.com \
    --cc=robh+dt@kernel.org \
    --cc=will.deacon@arm.com \
    /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

Powered by JetHome