Skip to contentSkip to conversation

docs/mm: Physical Memory: add example of interleaving nodes

PATCH Superseded Mike Rapoport 2 participants 3 messages Feb 12, 2023

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Mike Rapoport

author reviewer
#0 lore raw

PATCH v2 1/1 docs/mm: Physical Memory: add example of interleaving nodes

From: "Mike Rapoport (IBM)" <[email protected]>

Add an example of memory layout with interleaving nodes where even memory banks belong to node 0 and odd memory banks belong to node 1

---

v2:
* Wording update (Bagas)
* Add forgotten Suggested-by

v1: https://lore.kernel.org/all/[email protected]

 Documentation/mm/physical_memory.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Documentation/mm/physical_memory.rst +19 -0
index 3f3c02aa6e6e..d14b785fd938 100644
@@ -114,6 +114,25 @@ RAM equally split between two nodes, there will be ``ZONE_DMA32``,
   |  DMA32  |  NORMAL  |  MOVABLE  | |   NORMAL   |   MOVABLE   |
   +---------+----------+-----------+ +------------+-------------+
 
+
+Note, that memory banks may belong to interleaving nodes. In the example
+below an x86 machine has 16Gbytes or RAM in 4 memory banks, even banks
+belong to node 0 and odd banks belong to node 1::
+
+
+  0              4G              8G             12G            16G
+  +-------------+ +-------------+ +-------------+ +-------------+
+  |    node 0   | |    node 1   | |    node 0   | |    node 1   |
+  +-------------+ +-------------+ +-------------+ +-------------+
+
+  0   16M      4G
+  +-----+-------+ +-------------+ +-------------+ +-------------+
+  | DMA | DMA32 | |    NORMAL   | |    NORMAL   | |    NORMAL   |
+  +-----+-------+ +-------------+ +-------------+ +-------------+
+
+In such case node 0 will span from 0 to 12 Gbytes and node 1 will span from
+4 to 16 Gbytes.
+
 .. _nodes:
 
 Nodes

base-commit: e076f253283c3e55a128fa9665c0e6cd8146948d

Signature · 1 line
2.35.1
#1 lore raw

Documentation/mm/physical_memory.rst RAM equally split between two nodes, there will be ``ZONE_DMA32``, · line 120

Quoted 3 lines · Mike Rapoport
Documentation/mm/physical_memory.rst +3 -0
+Note, that memory banks may belong to interleaving nodes. In the example
+below an x86 machine has 16Gbytes or RAM in 4 memory banks, even banks
+belong to node 0 and odd banks belong to node 1::

s/or RAM/of RAM/

The "Note," is superfluous, you can just write:

Memory banks may belong to interleaved nodes.

And I think we prefer the newer form "GiB" for new documentation.

Documentation/mm/physical_memory.rst RAM equally split between two nodes, there will be ``ZONE_DMA32``, · line 134

Quoted 13 lines
Documentation/mm/physical_memory.rst +13 -0
+
+  0              4G              8G             12G            16G
+  +-------------+ +-------------+ +-------------+ +-------------+
+  |    node 0   | |    node 1   | |    node 0   | |    node 1   |
+  +-------------+ +-------------+ +-------------+ +-------------+
+
+  0   16M      4G
+  +-----+-------+ +-------------+ +-------------+ +-------------+
+  | DMA | DMA32 | |    NORMAL   | |    NORMAL   | |    NORMAL   |
+  +-----+-------+ +-------------+ +-------------+ +-------------+
+
+In such case node 0 will span from 0 to 12 Gbytes and node 1 will span from
+4 to 16 Gbytes.

s/such/this/ (and I'd use GiB again)

author reviewer
#2 lore raw
Quoted 6 lines · Matthew Wilcox

Documentation/mm/physical_memory.rst RAM equally split between two nodes, there will be ``ZONE_DMA32``, · line 120

Quoted 3 lines · Mike Rapoport
Documentation/mm/physical_memory.rst +3 -0
+Note, that memory banks may belong to interleaving nodes. In the example
+below an x86 machine has 16Gbytes or RAM in 4 memory banks, even banks
+belong to node 0 and odd banks belong to node 1::

s/or RAM/of RAM/

Thanks

Quoted 3 lines

The "Note," is superfluous, you can just write:

Memory banks may belong to interleaved nodes.

Ok

Quoted 1 line

And I think we prefer the newer form "GiB" for new documentation.

I've used Gbytes in previous examples, so I'd prefer to keep it consistent We can swipe s/Gbytes/GiB/g later.

Quoted 15 lines

Documentation/mm/physical_memory.rst RAM equally split between two nodes, there will be ``ZONE_DMA32``, · line 134

Quoted 13 lines
Documentation/mm/physical_memory.rst +13 -0
+
+  0              4G              8G             12G            16G
+  +-------------+ +-------------+ +-------------+ +-------------+
+  |    node 0   | |    node 1   | |    node 0   | |    node 1   |
+  +-------------+ +-------------+ +-------------+ +-------------+
+
+  0   16M      4G
+  +-----+-------+ +-------------+ +-------------+ +-------------+
+  | DMA | DMA32 | |    NORMAL   | |    NORMAL   | |    NORMAL   |
+  +-----+-------+ +-------------+ +-------------+ +-------------+
+
+In such case node 0 will span from 0 to 12 Gbytes and node 1 will span from
+4 to 16 Gbytes.

s/such/this/ (and I'd use GiB again)

Signature · 2 lines
Sincerely yours,
Mike.