All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Ganapatrao Kulkarni <gpkulkarni-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Ganapatrao Kulkarni
	<gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>,
	Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Leif Lindholm
	<leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	rfranz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
	Ard Biesheuvel
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Steve Capper
	<steve.capper-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Hanjun Guo <hanjun.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Al Stone <al.stone-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
	Len Brown <lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>,
	Robert Richter <rrichter@>
Subject: Re: [PATCH v7 2/4] Documentation, dt, arm64/arm: dt bindings for numa.
Date: Thu, 17 Dec 2015 19:07:08 +0000	[thread overview]
Message-ID: <20151217190708.GA14030@leverpostej> (raw)
In-Reply-To: <CAFpQJXXopH4_GjE=dX0+NPcfwzRgErEFVMkGd57K+4=YZPDVsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi,

On Fri, Dec 11, 2015 at 08:11:07PM +0530, Ganapatrao Kulkarni wrote:
> On Fri, Dec 11, 2015 at 7:23 PM, Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> wrote:
> > Hi,
> >
> > On Tue, Nov 17, 2015 at 10:50:41PM +0530, Ganapatrao Kulkarni wrote:
> >> DT bindings for numa mapping of memory, cores and IOs.
> >>
> >> Reviewed-by: Robert Richter <rrichter-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> >> Signed-off-by: Ganapatrao Kulkarni <gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
> >
> > Overall this looks good to me. However, I have a couple of concerns.
> thanks.

[...]

> >> +==============================================================================
> >> +2 - numa-node-id
> >> +==============================================================================
> >> +The device node property numa-node-id describes numa domains within a
> >> +machine. This property can be used in device nodes like cpu, memory, bus and
> >> +devices to map to respective numa nodes.
> >> +
> >> +numa-node-id property is a 32-bit integer which defines numa node id to which
> >> +this device node has numa domain association.
> >
> > I'd prefer if the above two paragraphs were replaced with:
> >
> >         For the purpose of identification, each NUMA node is associated
> >         with a unique token known as a node id. For the purpose of this
> >         binding a node id is a 32-bit integer.
> >
> >         A device node is associated with a NUMA node by the presence of
> >         a numa-node-id property which contains the node id of the
> >         device.
> ok, will do.

[...]

> >> +==============================================================================
> >> +3 - distance-map
> >> +==============================================================================
> >> +
> >> +The device tree node distance-map describes the relative
> >> +distance (memory latency) between all numa nodes.
> >
> > Is this not a combined approximation for latency and bandwidth?
> AFAIK, it is to represent inter-node memory access latency.
> >
> >> +- compatible : Should at least contain "numa,distance-map-v1".
> >
> > Please use "numa-distance-map-v1", as "numa" is not a vendor.
> ok
> >
> >> +- 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.
> >> +     2. If both directions between 2 nodes have the same distance, only
> >> +            one entry is required.
> >
> > I still don't understand what direction means in this context. Are there
> > systems (of any architecture) which don't have symmetric distances?
> > Which accesses does this apply differently to?
> >
> > Given that, I think that it might be best to explicitly call out
> > distances as being equal, and leave any directionality for a later
> > revision of the binding when we have some semantics for directionality.
> agreed, given that there is no know system to substantiate dual direction,
> let us not explicit about direction.

Regarding your comment in [1], I was expecting a respin of this series
with the above comments addressed. I will not provide an ack until I've
seen that.

Additional concerns below also apply.

> >> +     2. distance-matrix shold have entries in lexicographical ascending order of nodes.
> >> +     3. There must be only one Device node distance-map and must reside in the root node.
> >> +
> >> +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 inter node distance would be for this topology will be,
> >> +           0 -> 1 = 20
> >> +           1 -> 2 = 20
> >> +           2 -> 3 = 20
> >> +           3 -> 0 = 20
> >> +           0 -> 2 = 40
> >> +           1 -> 3 = 40
> >
> > How is this scaled relative to a local access?
> this is based on representing local distance with 10 and
> all inter-node latency being represented as multiple of 10.
> 
> >
> > Do we assume that a local access has value 1, e.g. each hop takes 20x a
> > local access in this example?
> The local distance is represented as 10, this is fixed and same as in ACPI.
> Inter-node distance can be any number greater than 10.
> this information can be added here to make it clear.

This seems rather arbitrary.

Why can we not define the local distance in the DT? I appreciate that
the value is hard-coded for ACPI, but we don't have to copy that
limitation.

I'm not sure if asymmetric local distances matter.

Thanks,
Mark.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/394634.html
--
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

WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 2/4] Documentation, dt, arm64/arm: dt bindings for numa.
Date: Thu, 17 Dec 2015 19:07:08 +0000	[thread overview]
Message-ID: <20151217190708.GA14030@leverpostej> (raw)
In-Reply-To: <CAFpQJXXopH4_GjE=dX0+NPcfwzRgErEFVMkGd57K+4=YZPDVsw@mail.gmail.com>

Hi,

On Fri, Dec 11, 2015 at 08:11:07PM +0530, Ganapatrao Kulkarni wrote:
> On Fri, Dec 11, 2015 at 7:23 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> > Hi,
> >
> > On Tue, Nov 17, 2015 at 10:50:41PM +0530, Ganapatrao Kulkarni wrote:
> >> DT bindings for numa mapping of memory, cores and IOs.
> >>
> >> Reviewed-by: Robert Richter <rrichter@cavium.com>
> >> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> >
> > Overall this looks good to me. However, I have a couple of concerns.
> thanks.

[...]

> >> +==============================================================================
> >> +2 - numa-node-id
> >> +==============================================================================
> >> +The device node property numa-node-id describes numa domains within a
> >> +machine. This property can be used in device nodes like cpu, memory, bus and
> >> +devices to map to respective numa nodes.
> >> +
> >> +numa-node-id property is a 32-bit integer which defines numa node id to which
> >> +this device node has numa domain association.
> >
> > I'd prefer if the above two paragraphs were replaced with:
> >
> >         For the purpose of identification, each NUMA node is associated
> >         with a unique token known as a node id. For the purpose of this
> >         binding a node id is a 32-bit integer.
> >
> >         A device node is associated with a NUMA node by the presence of
> >         a numa-node-id property which contains the node id of the
> >         device.
> ok, will do.

[...]

> >> +==============================================================================
> >> +3 - distance-map
> >> +==============================================================================
> >> +
> >> +The device tree node distance-map describes the relative
> >> +distance (memory latency) between all numa nodes.
> >
> > Is this not a combined approximation for latency and bandwidth?
> AFAIK, it is to represent inter-node memory access latency.
> >
> >> +- compatible : Should at least contain "numa,distance-map-v1".
> >
> > Please use "numa-distance-map-v1", as "numa" is not a vendor.
> ok
> >
> >> +- 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.
> >> +     2. If both directions between 2 nodes have the same distance, only
> >> +            one entry is required.
> >
> > I still don't understand what direction means in this context. Are there
> > systems (of any architecture) which don't have symmetric distances?
> > Which accesses does this apply differently to?
> >
> > Given that, I think that it might be best to explicitly call out
> > distances as being equal, and leave any directionality for a later
> > revision of the binding when we have some semantics for directionality.
> agreed, given that there is no know system to substantiate dual direction,
> let us not explicit about direction.

Regarding your comment in [1], I was expecting a respin of this series
with the above comments addressed. I will not provide an ack until I've
seen that.

Additional concerns below also apply.

> >> +     2. distance-matrix shold have entries in lexicographical ascending order of nodes.
> >> +     3. There must be only one Device node distance-map and must reside in the root node.
> >> +
> >> +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 inter node distance would be for this topology will be,
> >> +           0 -> 1 = 20
> >> +           1 -> 2 = 20
> >> +           2 -> 3 = 20
> >> +           3 -> 0 = 20
> >> +           0 -> 2 = 40
> >> +           1 -> 3 = 40
> >
> > How is this scaled relative to a local access?
> this is based on representing local distance with 10 and
> all inter-node latency being represented as multiple of 10.
> 
> >
> > Do we assume that a local access has value 1, e.g. each hop takes 20x a
> > local access in this example?
> The local distance is represented as 10, this is fixed and same as in ACPI.
> Inter-node distance can be any number greater than 10.
> this information can be added here to make it clear.

This seems rather arbitrary.

Why can we not define the local distance in the DT? I appreciate that
the value is hard-coded for ACPI, but we don't have to copy that
limitation.

I'm not sure if asymmetric local distances matter.

Thanks,
Mark.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/394634.html

  parent reply	other threads:[~2015-12-17 19:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 17:20 [PATCH v7 0/4] arm64, numa: Add numa support for arm64 platforms Ganapatrao Kulkarni
2015-11-17 17:20 ` Ganapatrao Kulkarni
2015-11-17 17:20 ` [PATCH v7 1/4] arm64, numa: adding " Ganapatrao Kulkarni
2015-11-17 17:20   ` Ganapatrao Kulkarni
     [not found]   ` <1447780843-9223-2-git-send-email-gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2015-11-27  8:00     ` Shannon Zhao
2015-11-27  8:00       ` Shannon Zhao
     [not found]       ` <56580D80.2050806-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-12-01  8:45         ` Ganapatrao Kulkarni
2015-12-01  8:45           ` Ganapatrao Kulkarni
2015-12-17 17:11     ` Will Deacon
2015-12-17 17:11       ` Will Deacon
     [not found]       ` <20151217171131.GC24108-5wv7dgnIgG8@public.gmane.org>
2015-12-17 18:30         ` Ganapatrao Kulkarni
2015-12-17 18:30           ` Ganapatrao Kulkarni
     [not found]           ` <CAFpQJXW0Ac4-3aQLZ_Pw_uG65F-EQmBYk4p-ntUu5tLey2hARA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-22  9:34             ` Ganapatrao Kulkarni
2015-12-22  9:34               ` Ganapatrao Kulkarni
     [not found]               ` <CAFpQJXUoSojdOuZPFEuD+T2DdEv_t3y68osXT8Zja3xG47qVsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-22  9:55                 ` Will Deacon
2015-12-22  9:55                   ` Will Deacon
     [not found]                   ` <20151222095529.GB32623-5wv7dgnIgG8@public.gmane.org>
2015-12-22 13:43                     ` Ganapatrao Kulkarni
2015-12-22 13:43                       ` Ganapatrao Kulkarni
2015-11-17 17:20 ` [PATCH v7 2/4] Documentation, dt, arm64/arm: dt bindings for numa Ganapatrao Kulkarni
2015-11-17 17:20   ` Ganapatrao Kulkarni
     [not found]   ` <1447780843-9223-3-git-send-email-gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2015-12-11 13:53     ` Mark Rutland
2015-12-11 13:53       ` Mark Rutland
2015-12-11 14:41       ` Ganapatrao Kulkarni
2015-12-11 14:41         ` Ganapatrao Kulkarni
     [not found]         ` <CAFpQJXXopH4_GjE=dX0+NPcfwzRgErEFVMkGd57K+4=YZPDVsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-17 19:07           ` Mark Rutland [this message]
2015-12-17 19:07             ` Mark Rutland
2015-12-18  3:10             ` Ganapatrao Kulkarni
2015-12-18  3:10               ` Ganapatrao Kulkarni
2015-11-17 17:20 ` [PATCH v7 3/4] arm64/arm, numa, dt: adding numa dt binding implementation for arm64 platforms Ganapatrao Kulkarni
2015-11-17 17:20   ` Ganapatrao Kulkarni
     [not found]   ` <1447780843-9223-4-git-send-email-gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2015-11-28  9:30     ` Shannon Zhao
2015-11-28  9:30       ` Shannon Zhao
     [not found]       ` <5659741F.9090606-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-12-01  8:43         ` Ganapatrao Kulkarni
2015-12-01  8:43           ` Ganapatrao Kulkarni
     [not found] ` <1447780843-9223-1-git-send-email-gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2015-11-17 17:20   ` [PATCH v7 4/4] arm64, dt, thunderx: Add initial dts for Cavium Thunderx in 2 node topology Ganapatrao Kulkarni
2015-11-17 17:20     ` Ganapatrao Kulkarni
2015-12-02 11:19   ` [PATCH v7 0/4] arm64, numa: Add numa support for arm64 platforms Ganapatrao Kulkarni
2015-12-02 11:19     ` Ganapatrao Kulkarni

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=20151217190708.GA14030@leverpostej \
    --to=mark.rutland-5wv7dgnigg8@public.gmane.org \
    --cc=Will.Deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=al.stone-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@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=hanjun.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=marc.zyngier-5wv7dgnIgG8@public.gmane.org \
    --cc=msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rfranz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
    --cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=steve.capper-QSEj5FYQhm4dnm+yROfE0A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.