1 ============================================== 2 NUMA binding description. 3 ============================================== 4 5 ============================================== 6 1 - Introduction 7 ============================================== 8 9 Systems employing a Non Uniform Memory Access 10 collections of hardware resources including pr 11 that comprise what is commonly known as a NUMA 12 Processor accesses to memory within the local 13 than processor accesses to memory outside of t 14 DT defines interfaces that allow the platform 15 topology information to OS. 16 17 ============================================== 18 2 - numa-node-id 19 ============================================== 20 21 For the purpose of identification, each NUMA n 22 token known as a node id. For the purpose of t 23 a node id is a 32-bit integer. 24 25 A device node is associated with a NUMA node b 26 numa-node-id property which contains the node 27 28 Example: 29 /* numa node 0 */ 30 numa-node-id = <0>; 31 32 /* numa node 1 */ 33 numa-node-id = <1>; 34 35 ============================================== 36 3 - distance-map 37 ============================================== 38 39 The optional device tree node distance-map des 40 distance (memory latency) between all numa nod 41 42 - compatible : Should at least contain "numa-d 43 44 - distance-matrix 45 This property defines a matrix to describe t 46 between all numa nodes. 47 It is represented as a list of node pairs an 48 49 Note: 50 1. Each entry represents distance from 51 The distances are equal in either dire 52 2. The distance from a node to self (l 53 with value 10 and all internode distan 54 a value greater than 10. 55 3. distance-matrix should have entries 56 order of nodes. 57 4. There must be only one device node 58 reside in the root node. 59 5. If the distance-map node is not pre 60 distance-matrix is used. 61 62 Example: 63 4 nodes connected in mesh/ring topolog 64 65 0_______20______1 66 | | 67 | | 68 20 20 69 | | 70 | | 71 |_______________| 72 3 20 2 73 74 if relative distance for each hop is 2 75 then internode distance would be, 76 0 -> 1 = 20 77 1 -> 2 = 20 78 2 -> 3 = 20 79 3 -> 0 = 20 80 0 -> 2 = 40 81 1 -> 3 = 40 82 83 and dt presentation for this distance mat 84 85 distance-map { 86 compatible = "numa-di 87 distance-matrix = <0 88 <0 89 <0 90 <0 91 <1 92 <1 93 <1 94 <1 95 <2 96 <2 97 <2 98 <2 99 <3 100 <3 101 <3 102 <3 103 }; 104 105 ============================================== 106 4 - Empty memory nodes 107 ============================================== 108 109 Empty memory nodes, which no memory resides in 110 device nodes for these empty memory nodes. How 111 distance maps are still valid and memory may b 112 hotplug afterwards. 113 114 Example: 115 116 memory@0 { 117 device_type = "memory"; 118 reg = <0x0 0x0 0x0 0x80000000> 119 numa-node-id = <0>; 120 }; 121 122 memory@80000000 { 123 device_type = "memory"; 124 reg = <0x0 0x80000000 0x0 0x80 125 numa-node-id = <1>; 126 }; 127 128 /* Empty memory node 2 and 3 */ 129 distance-map { 130 compatible = "numa-distance-ma 131 distance-matrix = <0 0 10>, 132 <0 1 20>, 133 <0 2 40>, 134 <0 3 20>, 135 <1 0 20>, 136 <1 1 10>, 137 <1 2 20>, 138 <1 3 40>, 139 <2 0 40>, 140 <2 1 20>, 141 <2 2 10>, 142 <2 3 20>, 143 <3 0 20>, 144 <3 1 40>, 145 <3 2 20>, 146 <3 3 10>; 147 }; 148 149 ============================================== 150 5 - Example dts 151 ============================================== 152 153 Dual socket system consists of 2 boards connec 154 each board having one socket/soc of 8 cpus, me 155 156 memory@c00000 { 157 device_type = "memory"; 158 reg = <0x0 0xc00000 0x0 0x8000 159 /* node 0 */ 160 numa-node-id = <0>; 161 }; 162 163 memory@10000000000 { 164 device_type = "memory"; 165 reg = <0x100 0x0 0x0 0x8000000 166 /* node 1 */ 167 numa-node-id = <1>; 168 }; 169 170 cpus { 171 #address-cells = <2>; 172 #size-cells = <0>; 173 174 cpu@0 { 175 device_type = "cpu"; 176 compatible = "arm,arm 177 reg = <0x0 0x0>; 178 enable-method = "psci" 179 /* node 0 */ 180 numa-node-id = <0>; 181 }; 182 cpu@1 { 183 device_type = "cpu"; 184 compatible = "arm,arm 185 reg = <0x0 0x1>; 186 enable-method = "psci" 187 numa-node-id = <0>; 188 }; 189 cpu@2 { 190 device_type = "cpu"; 191 compatible = "arm,arm 192 reg = <0x0 0x2>; 193 enable-method = "psci" 194 numa-node-id = <0>; 195 }; 196 cpu@3 { 197 device_type = "cpu"; 198 compatible = "arm,arm 199 reg = <0x0 0x3>; 200 enable-method = "psci" 201 numa-node-id = <0>; 202 }; 203 cpu@4 { 204 device_type = "cpu"; 205 compatible = "arm,arm 206 reg = <0x0 0x4>; 207 enable-method = "psci" 208 numa-node-id = <0>; 209 }; 210 cpu@5 { 211 device_type = "cpu"; 212 compatible = "arm,arm 213 reg = <0x0 0x5>; 214 enable-method = "psci" 215 numa-node-id = <0>; 216 }; 217 cpu@6 { 218 device_type = "cpu"; 219 compatible = "arm,arm 220 reg = <0x0 0x6>; 221 enable-method = "psci" 222 numa-node-id = <0>; 223 }; 224 cpu@7 { 225 device_type = "cpu"; 226 compatible = "arm,arm 227 reg = <0x0 0x7>; 228 enable-method = "psci" 229 numa-node-id = <0>; 230 }; 231 cpu@8 { 232 device_type = "cpu"; 233 compatible = "arm,arm 234 reg = <0x0 0x8>; 235 enable-method = "psci" 236 /* node 1 */ 237 numa-node-id = <1>; 238 }; 239 cpu@9 { 240 device_type = "cpu"; 241 compatible = "arm,arm 242 reg = <0x0 0x9>; 243 enable-method = "psci" 244 numa-node-id = <1>; 245 }; 246 cpu@a { 247 device_type = "cpu"; 248 compatible = "arm,arm 249 reg = <0x0 0xa>; 250 enable-method = "psci" 251 numa-node-id = <1>; 252 }; 253 cpu@b { 254 device_type = "cpu"; 255 compatible = "arm,arm 256 reg = <0x0 0xb>; 257 enable-method = "psci" 258 numa-node-id = <1>; 259 }; 260 cpu@c { 261 device_type = "cpu"; 262 compatible = "arm,arm 263 reg = <0x0 0xc>; 264 enable-method = "psci" 265 numa-node-id = <1>; 266 }; 267 cpu@d { 268 device_type = "cpu"; 269 compatible = "arm,arm 270 reg = <0x0 0xd>; 271 enable-method = "psci" 272 numa-node-id = <1>; 273 }; 274 cpu@e { 275 device_type = "cpu"; 276 compatible = "arm,arm 277 reg = <0x0 0xe>; 278 enable-method = "psci" 279 numa-node-id = <1>; 280 }; 281 cpu@f { 282 device_type = "cpu"; 283 compatible = "arm,arm 284 reg = <0x0 0xf>; 285 enable-method = "psci" 286 numa-node-id = <1>; 287 }; 288 }; 289 290 pcie0: pcie0@848000000000 { 291 compatible = "arm,armv8"; 292 device_type = "pci"; 293 bus-range = <0 255>; 294 #size-cells = <2>; 295 #address-cells = <3>; 296 reg = <0x8480 0x00000000 0 0x1 297 ranges = <0x03000000 0x8010 0x 298 /* node 0 */ 299 numa-node-id = <0>; 300 }; 301 302 pcie1: pcie1@948000000000 { 303 compatible = "arm,armv8"; 304 device_type = "pci"; 305 bus-range = <0 255>; 306 #size-cells = <2>; 307 #address-cells = <3>; 308 reg = <0x9480 0x00000000 0 0x1 309 ranges = <0x03000000 0x9010 0x 310 /* node 1 */ 311 numa-node-id = <1>; 312 }; 313 314 distance-map { 315 compatible = "numa-distance-ma 316 distance-matrix = <0 0 10>, 317 <0 1 20>, 318 <1 1 10>; 319 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.