From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cam-admin0.cambridge.arm.com (cam-admin0.cambridge.arm.com [217.140.96.50]) by lists.ozlabs.org (Postfix) with ESMTP id 6545B1A0194 for ; Thu, 18 Sep 2014 05:46:46 +1000 (EST) Date: Wed, 17 Sep 2014 20:34:52 +0100 From: Mark Rutland To: Kumar Gala Subject: Re: [RFC PATCH] dt:numa: adding numa node mapping for memory nodes. Message-ID: <20140917193452.GD7983@leverpostej> References: <1410944189-3608-1-git-send-email-ganapatrao.kulkarni@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: Cc: "open list:OPEN FIRMWARE AND..." , Pawel Moll , Ian Campbell , Rob Herring , Ganapatrao Kulkarni , linuxppc-dev , "linux-arm-kernel@lists.infradead.org" , "gpkulkarni@gmail.com" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Sep 17, 2014 at 04:37:30PM +0100, Kumar Gala wrote: > > On Sep 17, 2014, at 1:56 AM, Ganapatrao Kulkarni wrote: > > > From: Ganapatrao Kulkarni > > > > This patch adds property "nid" to memory node to provide the memory range to > > numa node id mapping. > > > > Signed-off-by: Ganapatrao Kulkarni > > > > — > > Adding the PPC guys as they’ve been doing NUMA on IBM Power Servers > for years with OF/DT. So we should really try and follow what they’ve > done. Agreed. > > Documentation/devicetree/bindings/numa.txt | 58 ++++++++++++++++++++++++++++++ > > 1 file changed, 58 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..c4a94f2 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/numa.txt > > @@ -0,0 +1,58 @@ > > +====================================================== > > +numa id binding description > > +====================================================== > > + > > +====================================================== > > +1 - Introduction > > +====================================================== > > +The device node property "nid(numa node id)" can be added to memory Why the quotes? > > +device node to map the range of memory addresses as defined in property "reg". > > +The property "nid" maps the memory range to the numa node id, which is used to > > +find the local and remory pages on numa aware systems. What is a "numa node id", exactly, and how is the OS intended to use it? I don't see how this can be of any use as-is. Mark. > > + > > +====================================================== > > +2 - nid property > > +====================================================== > > +Numa node id, "nid" is required property of memory device node for > > +numa enabled platforms. > > + > > +|------------------------------------------------------| > > +|Property Type | Usage | Value Type | Definition | > > +|------------------------------------------------------| > > +| nid | R | | Numa Node id | > > +| | | | for this memory | > > +|------------------------------------------------------| > > + > > +======================================================== > > +4 - Example memory nodes with numa node id mapping > > +======================================================== > > + > > +Example 1 (2 memory nodes, each mapped to a numa node.): > > + > > + memory@00000000 { > > + device_type = "memory"; > > + reg = <0x0 0x00000000 0x0 0x80000000>; > > + nid = <0x0>; > > + }; > > + > > + memory@10000000000 { > > + device_type = "memory"; > > + reg = <0x100 0x00000000 0x0 0x80000000>; > > + nid = <0x1>; > > + }; > > + > > +Example 2 (multiple memory ranges in each memory node and mapped to numa node): > > + > > + memory@00000000 { > > + device_type = "memory"; > > + reg = <0x0 0x00000000 0x0 0x80000000>, > > + <0x0 0x80000000 0x0 0x80000000>; > > + nid = <0x0>; > > + }; > > + > > + memory@10000000000 { > > + device_type = "memory"; > > + reg = <0x100 0x00000000 0x0 0x80000000>, > > + <0x100 0x80000000 0x0 0x80000000>; > > + nid = <0x1>; > > + }; > > -- > > 1.8.1.4 > > > > -- > Employee of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >