From: Robert Richter <robert.richter-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
To: Ganapatrao Kulkarni <gpkulkarni-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: David Daney
<ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Matt Fleming
<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
Ard Biesheuvel
<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
David Daney <ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Ganapatrao Kulkarni
<gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>,
Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v14 2/6] Documentation, dt, numa: dt bindings for NUMA.
Date: Tue, 8 Mar 2016 09:34:36 +0100 [thread overview]
Message-ID: <20160308083436.GC24726@rric.localdomain> (raw)
In-Reply-To: <CAFpQJXWHXxa2DLKHpLHqnURUJqY-+P-vLintUoCmm3Fmh6xsZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 08.03.16 10:31:33, Ganapatrao Kulkarni wrote:
> On Tue, Mar 8, 2016 at 1:17 AM, David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org> wrote:
> > On 03/07/2016 11:22 AM, Robert Richter wrote:
> >>
> >> On 03.03.16 15:55:35, David Daney wrote:
> >>>
> >>> From: Ganapatrao Kulkarni <gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
> >>>
> >>> Add DT bindings for numa mapping of memory, CPUs and IOs.
> >>>
> >>> Reviewed-by: Robert Richter <rrichter-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> >>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
> >>> Signed-off-by: David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> >>> ---
> >>> 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.
Which means distance-map is not optional for numa.
> IMO, return 0 will allow 2 node system to have distance-map optional.
> by default node distance is set to 10 for local node and for remote node is 20
> and this will suffice the need of 2 node system.
> by returning EINVAL, we are forcing 2 node system (and even for
> systems which has equal remote distances)
> to define distance-map.
This is exaclty the problem. numa_init() fails if there is no
distance-map node.
> > By adding your Reviewed-by: Robert Richter <rrichter-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org> tag to
> > patch 5/6, where we select between "real" and "dummy_numa", I had assumed
> > that you agreed with this approach.
This is from v6:
if (strcmp(uname, "distance-map") != 0)
return 0;
-Robert
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-08 8:34 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
[not found] ` <1457049339-23351-1-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-03 23:55 ` [PATCH v14 2/6] Documentation, dt, numa: dt bindings for NUMA David Daney
[not found] ` <1457049339-23351-3-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-04 0:17 ` Rob Herring
2016-03-07 19:22 ` Robert Richter
2016-03-07 19:47 ` David Daney
[not found] ` <56DDDAC9.1010600-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-03-08 5:01 ` Ganapatrao Kulkarni
[not found] ` <CAFpQJXWHXxa2DLKHpLHqnURUJqY-+P-vLintUoCmm3Fmh6xsZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-08 8:34 ` Robert Richter [this message]
2016-03-03 23:55 ` [PATCH v14 3/6] of, numa: Add NUMA of binding implementation David Daney
[not found] ` <1457049339-23351-4-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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=20160308083436.GC24726@rric.localdomain \
--to=robert.richter-m3mlkvoiwjvv6pq1l3v1odbpr1lh4cv8@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org \
--cc=ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org \
--cc=gpkulkarni-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.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