Documentation/driver-api/edac.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

Error Detection And Correction (EDAC) Devices

EDAC memory 용어, MC/PCI/generic device API와 AMD CPU·MI200 GPU hierarchy를 설명합니다.

Source pathDocumentation/driver-api/edac.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

edac.rst:1-298

EDAC은 DRAM device·DIMM·socket·channel·rank·CSROW의 의미를 명확히 하고 memory controller, PCI controller, 그 밖의 ECC hardware를 각각 전용 core object로 관리합니다. driver는 opaque `mem_ctl_info`를 직접 만지지 않고 allocation·reporting API를 사용합니다.

AMD heterogeneous system에서는 CPU와 xGMI로 연결된 MI200 GPU의 data fabric을 EDAC MC, UMC를 CSROW, UMC channel을 EDAC channel로 mapping합니다. CPU node 뒤에 GPU node를 순차 enumerate해 sysfs에서 physical/error topology를 일관되게 노출합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 Error Detection And Correction (EDAC) Devices
2 =============================================
3
4 Main Concepts used at the EDAC subsystem
5 ----------------------------------------
6
7 There are several things to be aware of that aren't at all obvious, like
8 *sockets, *socket sets*, *banks*, *rows*, *chip-select rows*, *channels*,
9 etc...
10
11 These are some of the many terms that are thrown about that don't always
12 mean what people think they mean (Inconceivable!). In the interest of
13 creating a common ground for discussion, terms and their definitions
14 will be established.
15
16 * Memory devices
17
18 The individual DRAM chips on a memory stick. These devices commonly
19 output 4 and 8 bits each (x4, x8). Grouping several of these in parallel
20 provides the number of bits that the memory controller expects:
21 typically 72 bits, in order to provide 64 bits + 8 bits of ECC data.
22
23 * Memory Stick
24
25 A printed circuit board that aggregates multiple memory devices in
26 parallel. In general, this is the Field Replaceable Unit (FRU) which
27 gets replaced, in the case of excessive errors. Most often it is also
28 called DIMM (Dual Inline Memory Module).
29
30 * Memory Socket
31
32 A physical connector on the motherboard that accepts a single memory
33 stick. Also called as "slot" on several datasheets.
34
35 * Channel
36
37 A memory controller channel, responsible to communicate with a group of
38 DIMMs. Each channel has its own independent control (command) and data
39 bus, and can be used independently or grouped with other channels.
40
41 * Branch
42
43 It is typically the highest hierarchy on a Fully-Buffered DIMM memory
44 controller. Typically, it contains two channels. Two channels at the
45 same branch can be used in single mode or in lockstep mode. When
46 lockstep is enabled, the cacheline is doubled, but it generally brings
47 some performance penalty. Also, it is generally not possible to point to
48 just one memory stick when an error occurs, as the error correction code
49 is calculated using two DIMMs instead of one. Due to that, it is capable
50 of correcting more errors than on single mode.
51
52 * Single-channel
53
54 The data accessed by the memory controller is contained into one dimm
55 only. E. g. if the data is 64 bits-wide, the data flows to the CPU using
56 one 64 bits parallel access. Typically used with SDR, DDR, DDR2 and DDR3
57 memories. FB-DIMM and RAMBUS use a different concept for channel, so
58 this concept doesn't apply there.
59
60 * Double-channel
61
62 The data size accessed by the memory controller is interlaced into two
63 dimms, accessed at the same time. E. g. if the DIMM is 64 bits-wide (72
64 bits with ECC), the data flows to the CPU using a 128 bits parallel
65 access.
66
67 * Chip-select row
68
69 This is the name of the DRAM signal used to select the DRAM ranks to be
70 accessed. Common chip-select rows for single channel are 64 bits, for
71 dual channel 128 bits. It may not be visible by the memory controller,
72 as some DIMM types have a memory buffer that can hide direct access to
73 it from the Memory Controller.
74
75 * Single-Ranked stick
76
77 A Single-ranked stick has 1 chip-select row of memory. Motherboards
78 commonly drive two chip-select pins to a memory stick. A single-ranked
79 stick, will occupy only one of those rows. The other will be unused.
80
81 .. _doubleranked:
82
83 * Double-Ranked stick
84
85 A double-ranked stick has two chip-select rows which access different
86 sets of memory devices. The two rows cannot be accessed concurrently.
87
88 * Double-sided stick
89
90 **DEPRECATED TERM**, see :ref:`Double-Ranked stick <doubleranked>`.
91
92 A double-sided stick has two chip-select rows which access different sets
93 of memory devices. The two rows cannot be accessed concurrently.
94 "Double-sided" is irrespective of the memory devices being mounted on
95 both sides of the memory stick.
96
97 * Socket set
98
99 All of the memory sticks that are required for a single memory access or
100 all of the memory sticks spanned by a chip-select row. A single socket
101 set has two chip-select rows and if double-sided sticks are used these
102 will occupy those chip-select rows.
103
104 * Bank
105
106 This term is avoided because it is unclear when needing to distinguish
107 between chip-select rows and socket sets.
108
109 * High Bandwidth Memory (HBM)
110
111 HBM is a new memory type with low power consumption and ultra-wide
112 communication lanes. It uses vertically stacked memory chips (DRAM dies)
113 interconnected by microscopic wires called "through-silicon vias," or
114 TSVs.
115
116 Several stacks of HBM chips connect to the CPU or GPU through an ultra-fast
117 interconnect called the "interposer". Therefore, HBM's characteristics
118 are nearly indistinguishable from on-chip integrated RAM.
119
120 Memory Controllers
121 ------------------
122
123 Most of the EDAC core is focused on doing Memory Controller error detection.
124 The :c:func:`edac_mc_alloc`. It uses internally the struct ``mem_ctl_info``
125 to describe the memory controllers, with is an opaque struct for the EDAC
126 drivers. Only the EDAC core is allowed to touch it.
127
128 .. kernel-doc:: include/linux/edac.h
129
130 .. kernel-doc:: drivers/edac/edac_mc.h
131
132 PCI Controllers
133 ---------------
134
135 The EDAC subsystem provides a mechanism to handle PCI controllers by calling
136 the :c:func:`edac_pci_alloc_ctl_info`. It will use the struct
137 :c:type:`edac_pci_ctl_info` to describe the PCI controllers.
138
139 .. kernel-doc:: drivers/edac/edac_pci.h
140
141 EDAC Blocks
142 -----------
143
144 The EDAC subsystem also provides a generic mechanism to report errors on
145 other parts of the hardware via :c:func:`edac_device_alloc_ctl_info` function.
146
147 The structures :c:type:`edac_dev_sysfs_block_attribute`,
148 :c:type:`edac_device_block`, :c:type:`edac_device_instance` and
149 :c:type:`edac_device_ctl_info` provide a generic or abstract 'edac_device'
150 representation at sysfs.
151
152 This set of structures and the code that implements the APIs for the same, provide for registering EDAC type devices which are NOT standard memory or
153 PCI, like:
154
155 - CPU caches (L1 and L2)
156 - DMA engines
157 - Core CPU switches
158 - Fabric switch units
159 - PCIe interface controllers
160 - other EDAC/ECC type devices that can be monitored for
161 errors, etc.
162
163 It allows for a 2 level set of hierarchy.
164
165 For example, a cache could be composed of L1, L2 and L3 levels of cache.
166 Each CPU core would have its own L1 cache, while sharing L2 and maybe L3
167 caches. On such case, those can be represented via the following sysfs
168 nodes::
169
170 /sys/devices/system/edac/..
171
172 pci/ <existing pci directory (if available)>
173 mc/ <existing memory device directory>
174 cpu/cpu0/.. <L1 and L2 block directory>
175 /L1-cache/ce_count
176 /ue_count
177 /L2-cache/ce_count
178 /ue_count
179 cpu/cpu1/.. <L1 and L2 block directory>
180 /L1-cache/ce_count
181 /ue_count
182 /L2-cache/ce_count
183 /ue_count
184 ...
185
186 the L1 and L2 directories would be "edac_device_block's"
187
188 .. kernel-doc:: drivers/edac/edac_device.h
189
190
191 Heterogeneous system support
192 ----------------------------
193
194 An AMD heterogeneous system is built by connecting the data fabrics of
195 both CPUs and GPUs via custom xGMI links. Thus, the data fabric on the
196 GPU nodes can be accessed the same way as the data fabric on CPU nodes.
197
198 The MI200 accelerators are data center GPUs. They have 2 data fabrics,
199 and each GPU data fabric contains four Unified Memory Controllers (UMC).
200 Each UMC contains eight channels. Each UMC channel controls one 128-bit
201 HBM2e (2GB) channel (equivalent to 8 X 2GB ranks). This creates a total
202 of 4096-bits of DRAM data bus.
203
204 While the UMC is interfacing a 16GB (8high X 2GB DRAM) HBM stack, each UMC
205 channel is interfacing 2GB of DRAM (represented as rank).
206
207 Memory controllers on AMD GPU nodes can be represented in EDAC thusly:
208
209 GPU DF / GPU Node -> EDAC MC
210 GPU UMC -> EDAC CSROW
211 GPU UMC channel -> EDAC CHANNEL
212
213 For example: a heterogeneous system with 1 AMD CPU is connected to
214 4 MI200 (Aldebaran) GPUs using xGMI.
215
216 Some more heterogeneous hardware details:
217
218 - The CPU UMC (Unified Memory Controller) is mostly the same as the GPU UMC.
219 They have chip selects (csrows) and channels. However, the layouts are different
220 for performance, physical layout, or other reasons.
221 - CPU UMCs use 1 channel, In this case UMC = EDAC channel. This follows the
222 marketing speak. CPU has X memory channels, etc.
223 - CPU UMCs use up to 4 chip selects, So UMC chip select = EDAC CSROW.
224 - GPU UMCs use 1 chip select, So UMC = EDAC CSROW.
225 - GPU UMCs use 8 channels, So UMC channel = EDAC channel.
226
227 The EDAC subsystem provides a mechanism to handle AMD heterogeneous
228 systems by calling system specific ops for both CPUs and GPUs.
229
230 AMD GPU nodes are enumerated in sequential order based on the PCI
231 hierarchy, and the first GPU node is assumed to have a Node ID value
232 following those of the CPU nodes after latter are fully populated::
233
234 $ ls /sys/devices/system/edac/mc/
235 mc0 - CPU MC node 0
236 mc1 |
237 mc2 |- GPU card[0] => node 0(mc1), node 1(mc2)
238 mc3 |
239 mc4 |- GPU card[1] => node 0(mc3), node 1(mc4)
240 mc5 |
241 mc6 |- GPU card[2] => node 0(mc5), node 1(mc6)
242 mc7 |
243 mc8 |- GPU card[3] => node 0(mc7), node 1(mc8)
244
245 For example, a heterogeneous system with one AMD CPU is connected to
246 four MI200 (Aldebaran) GPUs using xGMI. This topology can be represented
247 via the following sysfs entries::
248
249 /sys/devices/system/edac/mc/..
250
251 CPU # CPU node
252 ├── mc 0
253
254 GPU Nodes are enumerated sequentially after CPU nodes have been populated
255 GPU card 1 # Each MI200 GPU has 2 nodes/mcs
256 ├── mc 1 # GPU node 0 == mc1, Each MC node has 4 UMCs/CSROWs
257 │   ├── csrow 0 # UMC 0
258 │   │   ├── channel 0 # Each UMC has 8 channels
259 │   │   ├── channel 1 # size of each channel is 2 GB, so each UMC has 16 GB
260 │   │   ├── channel 2
261 │   │   ├── channel 3
262 │   │   ├── channel 4
263 │   │   ├── channel 5
264 │   │   ├── channel 6
265 │   │   ├── channel 7
266 │   ├── csrow 1 # UMC 1
267 │   │   ├── channel 0
268 │   │   ├── ..
269 │   │   ├── channel 7
270 │   ├── .. ..
271 │   ├── csrow 3 # UMC 3
272 │   │   ├── channel 0
273 │   │   ├── ..
274 │   │   ├── channel 7
275 │   ├── rank 0
276 │   ├── .. ..
277 │   ├── rank 31 # total 32 ranks/dimms from 4 UMCs
278
279 ├── mc 2 # GPU node 1 == mc2
280 │   ├── .. # each GPU has total 64 GB
281
282 GPU card 2
283 ├── mc 3
284 │   ├── ..
285 ├── mc 4
286 │   ├── ..
287
288 GPU card 3
289 ├── mc 5
290 │   ├── ..
291 ├── mc 6
292 │   ├── ..
293
294 GPU card 4
295 ├── mc 7
296 │   ├── ..
297 ├── mc 8
298 │   ├── ..
299

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

EDAC의 기본 memory 용어

1-39

문서 제목은 `Error Detection And Correction (EDAC) Devices`입니다. EDAC subsystem을 논의할 공통 기반을 만들기 위해 socket, socket set, bank, row, chip-select row, channel처럼 흔히 혼동되는 용어를 정의합니다.

`Memory devices`는 memory stick에 실린 개별 DRAM chip입니다. 보통 각 chip이 x4 또는 x8, 즉 4bit나 8bit를 출력합니다. 여러 chip을 병렬로 묶어 memory controller가 기대하는 bit 수를 제공하며, 일반적인 ECC 구성은 data 64bit와 ECC data 8bit를 합한 72bit입니다.

`Memory Stick`은 여러 memory device를 병렬로 모은 printed circuit board입니다. error가 너무 많이 발생했을 때 교체하는 Field Replaceable Unit(FRU)이며, 대개 DIMM(Dual Inline Memory Module)이라고도 합니다.

`Memory Socket`은 memory stick 하나를 꽂는 motherboard의 물리 connector입니다. 여러 datasheet에서는 slot이라고도 부릅니다.

`Channel`은 DIMM 그룹과 통신하는 memory controller channel입니다. 각 channel은 독립적인 control(command) bus와 data bus를 가지므로 독립적으로 사용하거나 다른 channel과 묶어 사용할 수 있습니다.

EDAC memory 물리 구성
단위구성EDAC 관점
Memory devicex4/x8 DRAM chipECC bit를 포함한 parallel width 구성
Memory stick여러 DRAM chip의 PCBFRU, 일반적으로 DIMM
Memory socketmotherboard connectorstick 하나를 수용하는 slot
Channel독립 command/data busDIMM 그룹과 통신

chip에서 controller channel까지의 기본 단위를 정리했습니다.

Branch·channel mode·chip-select row

40-73

`Branch`는 Fully-Buffered DIMM memory controller에서 보통 가장 높은 hierarchy이며 일반적으로 channel 두 개를 포함합니다. 같은 branch의 두 channel은 single mode 또는 lockstep mode로 사용할 수 있습니다.

lockstep을 활성화하면 cacheline이 두 배가 되고 보통 성능 penalty가 생깁니다. error correction code를 DIMM 하나가 아니라 두 개로 계산하므로 error가 발생해도 memory stick 하나만 특정하기 어려운 대신 single mode보다 더 많은 error를 교정할 수 있습니다.

`Single-channel`에서는 memory controller가 접근하는 data가 DIMM 하나에만 들어 있습니다. data width가 64bit라면 CPU로의 data flow는 한 번의 64bit parallel access를 사용합니다. 일반적으로 SDR, DDR, DDR2, DDR3에서 사용합니다. FB-DIMM과 RAMBUS는 channel 개념이 달라 이 정의가 적용되지 않습니다.

`Double-channel`에서는 memory controller가 접근하는 data를 DIMM 두 개에 interlace하고 동시에 접근합니다. DIMM이 64bit, ECC 포함 72bit라면 CPU로의 data flow는 128bit parallel access를 사용합니다.

`Chip-select row`는 접근할 DRAM rank를 선택하는 DRAM signal의 이름입니다. 일반적인 chip-select row width는 single channel에서 64bit, dual channel에서 128bit입니다. 일부 DIMM은 memory buffer가 memory controller의 직접 접근을 숨기므로 controller에서 chip-select row가 보이지 않을 수도 있습니다.

Memory channel mode 비교
Mode구성data access특성
Single-channelDIMM 1개예: 64bitSDR/DDR 계열의 일반 구성
Double-channelDIMM 2개 interlace예: 128bit동시 접근
Lockstep같은 branch의 channel 2개cacheline 2배성능 penalty, 더 강한 correction

single, double, lockstep mode의 data 폭과 error 특성을 비교합니다.

Rank·socket set·HBM

74-119

`Single-Ranked stick`은 memory chip-select row 하나를 가집니다. motherboard는 보통 memory stick에 chip-select pin 두 개를 구동하지만 single-ranked stick은 그중 row 하나만 차지하고 다른 하나는 사용하지 않습니다.

`Double-Ranked stick`은 서로 다른 memory device 집합에 접근하는 chip-select row 두 개를 가지며 두 row를 동시에 접근할 수 없습니다.

`Double-sided stick`은 deprecated term이며 `Double-Ranked stick`을 사용해야 합니다. double-sided라는 이름은 memory device가 stick 양면에 실제로 장착되었는지와 무관합니다. 이 용어도 서로 다른 device 집합에 접근하는 chip-select row 두 개를 뜻하며 동시 접근은 불가능합니다.

`Socket set`은 memory access 한 번에 필요한 모든 memory stick 또는 chip-select row 하나가 걸쳐 있는 모든 stick입니다. single socket set에는 chip-select row 두 개가 있고 double-sided stick을 쓰면 그 stick이 두 row를 차지합니다.

`Bank`는 chip-select row와 socket set을 구별해야 할 때 의미가 불명확하므로 EDAC 문서에서 피하는 용어입니다.

`High Bandwidth Memory(HBM)`은 저전력과 ultra-wide communication lane을 제공하는 새로운 memory type입니다. 수직으로 쌓은 DRAM die를 through-silicon via(TSV)라는 미세 배선으로 연결합니다. 여러 HBM chip stack은 interposer라는 초고속 interconnect를 통해 CPU 또는 GPU에 연결되므로 특성이 on-chip integrated RAM과 거의 구별되지 않습니다.

Rank 관련 용어
용어Chip-select row비고
Single-Ranked stick1두 pin 중 한 row만 사용
Double-Ranked stick2서로 다른 device 집합, 동시 접근 불가
Double-sided stick2deprecated; 실제 양면 실장과 무관
Socket set보통 2한 access 또는 row가 걸친 모든 stick
Bank불명확사용을 피함

stick의 chip-select row 수와 권장 용어를 정리했습니다.

Memory Controller와 PCI Controller

120-140

EDAC core의 대부분은 Memory Controller error detection에 집중합니다. `edac_mc_alloc()`이 memory controller를 위한 core object를 할당하며 내부적으로 `struct mem_ctl_info`를 사용합니다. 이 structure는 EDAC driver에 opaque하고 EDAC core만 직접 접근할 수 있습니다.

공개 EDAC 선언은 다음 header에서 kernel-doc으로 가져옵니다.

.. kernel-doc:: include/linux/edac.h

memory-controller 내부 API의 source path는 다음과 같습니다.

.. kernel-doc:: drivers/edac/edac_mc.h

PCI Controller의 경우 EDAC subsystem은 `edac_pci_alloc_ctl_info()`를 호출해 controller를 다루는 mechanism을 제공합니다. PCI controller 표현에는 `struct edac_pci_ctl_info`를 사용합니다.

.. kernel-doc:: drivers/edac/edac_pci.h
EDAC controller API 구분
대상Allocation APICore structure문서 source
Memory Controlleredac_mc_allocmem_ctl_info (opaque)include/linux/edac.h, drivers/edac/edac_mc.h
PCI Controlleredac_pci_alloc_ctl_infoedac_pci_ctl_infodrivers/edac/edac_pci.h

controller type별 allocation API와 representation을 연결했습니다.

일반 EDAC block

141-190

EDAC subsystem은 `edac_device_alloc_ctl_info()`를 통해 memory나 PCI가 아닌 다른 hardware 부분의 error를 보고하는 generic mechanism도 제공합니다.

`struct edac_dev_sysfs_block_attribute`, `struct edac_device_block`, `struct edac_device_instance`, `struct edac_device_ctl_info`는 sysfs에서 generic 또는 abstract `edac_device` representation을 제공합니다.

이 structure 집합과 API 구현은 standard memory나 PCI가 아닌 다음 EDAC type device를 등록할 수 있게 합니다.

  • CPU cache(L1과 L2)
  • DMA engine
  • core CPU switch
  • fabric switch unit
  • PCIe interface controller
  • error를 monitoring할 수 있는 그 밖의 EDAC/ECC type device

generic EDAC device는 2-level hierarchy를 지원합니다. 예를 들어 cache는 L1, L2, L3 level로 구성될 수 있고 각 CPU core는 자체 L1을 가지면서 L2와 경우에 따라 L3를 공유합니다. 이를 다음 sysfs node로 표현할 수 있습니다.

/sys/devices/system/edac/..

pci/                <existing pci directory (if available)>
mc/                <existing memory device directory>
cpu/cpu0/..        <L1 and L2 block directory>
        /L1-cache/ce_count
                 /ue_count
        /L2-cache/ce_count
                 /ue_count
cpu/cpu1/..        <L1 and L2 block directory>
        /L1-cache/ce_count
                 /ue_count
        /L2-cache/ce_count
                 /ue_count
...

the L1 and L2 directories would be "edac_device_block's"

이 예에서 L1과 L2 directory가 `edac_device_block`입니다. 관련 API source path는 다음과 같습니다.

.. kernel-doc:: drivers/edac/edac_device.h
Generic edac_device sysfs hierarchy
Level노출 attribute
EDAC device instancecpu/cpu0, cpu/cpu1core별 namespace
edac_device_blockL1-cache, L2-cachecache level
error counterce_count, ue_countcorrected/uncorrected error 수

CPU instance 아래 cache block과 error counter의 두 단계 구조입니다.

AMD heterogeneous system mapping

191-226

AMD heterogeneous system은 CPU와 GPU의 data fabric을 custom xGMI link로 연결합니다. 따라서 GPU node의 data fabric도 CPU node의 data fabric과 같은 방식으로 접근할 수 있습니다.

MI200 accelerator는 data center GPU이며 data fabric 두 개를 가집니다. 각 GPU data fabric에는 Unified Memory Controller(UMC) 네 개가 있고 각 UMC에는 channel 여덟 개가 있습니다. UMC channel 하나는 128-bit HBM2e 2GB channel 하나, 즉 2GB rank 여덟 개와 동등한 구성을 제어하며 총 DRAM data bus width는 4096bit입니다.

UMC 하나는 8-high x 2GB DRAM인 16GB HBM stack과 interface하고, UMC channel 하나는 rank로 표현되는 2GB DRAM과 interface합니다.

AMD GPU node의 memory controller는 EDAC에 다음과 같이 mapping됩니다.

GPU DF / GPU Node -> EDAC MC
GPU UMC           -> EDAC CSROW
GPU UMC channel   -> EDAC CHANNEL

예시는 AMD CPU 하나와 xGMI로 연결된 MI200(Aldebaran) GPU 네 개를 사용합니다. CPU UMC와 GPU UMC는 대부분 같고 chip select(csrow)와 channel을 가지지만 performance와 physical layout 등의 이유로 layout은 다릅니다.

  • CPU UMC는 channel 하나를 사용하므로 이 경우 UMC가 EDAC channel입니다. 이는 CPU가 X memory channel을 가진다는 marketing 용어를 따릅니다.
  • CPU UMC는 chip select를 최대 네 개 사용하므로 UMC chip select가 EDAC CSROW입니다.
  • GPU UMC는 chip select 하나만 사용하므로 UMC 자체가 EDAC CSROW입니다.
  • GPU UMC는 channel 여덟 개를 사용하므로 UMC channel이 EDAC channel입니다.
AMD CPU/GPU UMC의 EDAC mapping
Hardware objectEDAC object구성
GPU data fabric / GPU nodeEDAC MCMI200당 2 node
GPU UMCEDAC CSROWnode당 4 UMC
GPU UMC channelEDAC CHANNELUMC당 8 x 2GB
CPU UMCEDAC channelUMC당 channel 1
CPU UMC chip selectEDAC CSROW최대 4 chip select

hardware hierarchy를 MC, CSROW, channel object에 대응시켰습니다.

CPU·GPU MC node 열거

227-244

EDAC subsystem은 CPU와 GPU 양쪽에 system-specific operation을 호출해 AMD heterogeneous system을 처리합니다.

AMD GPU node는 PCI hierarchy에 따라 순서대로 enumerate됩니다. CPU node가 모두 채워진 다음, 첫 GPU node의 Node ID가 CPU node ID 뒤를 잇는다고 가정합니다.

$ ls /sys/devices/system/edac/mc/
        mc0   - CPU MC node 0
        mc1  |
        mc2  |- GPU card[0] => node 0(mc1), node 1(mc2)
        mc3  |
        mc4  |- GPU card[1] => node 0(mc3), node 1(mc4)
        mc5  |
        mc6  |- GPU card[2] => node 0(mc5), node 1(mc6)
        mc7  |
        mc8  |- GPU card[3] => node 0(mc7), node 1(mc8)
1 CPU + 4 MI200의 MC 번호
장치NodeEDAC MC
CPUCPU node 0mc0
GPU card 0node 0 / node 1mc1 / mc2
GPU card 1node 0 / node 1mc3 / mc4
GPU card 2node 0 / node 1mc5 / mc6
GPU card 3node 0 / node 1mc7 / mc8

CPU node를 먼저 배치한 뒤 GPU card별 두 node가 연속됩니다.

MI200 sysfs topology

245-298

AMD CPU 하나와 xGMI로 연결된 MI200 GPU 네 개의 topology는 다음 sysfs entry로 표현됩니다. 원문의 tree와 주석을 그대로 보존합니다.

/sys/devices/system/edac/mc/..

CPU                        # CPU node
├── mc 0

GPU Nodes are enumerated sequentially after CPU nodes have been populated
GPU card 1                # Each MI200 GPU has 2 nodes/mcs
├── mc 1                # GPU node 0 == mc1, Each MC node has 4 UMCs/CSROWs
│   ├── csrow 0                # UMC 0
│   │   ├── channel 0        # Each UMC has 8 channels
│   │   ├── channel 1   # size of each channel is 2 GB, so each UMC has 16 GB
│   │   ├── channel 2
│   │   ├── channel 3
│   │   ├── channel 4
│   │   ├── channel 5
│   │   ├── channel 6
│   │   ├── channel 7
│   ├── csrow 1                # UMC 1
│   │   ├── channel 0
│   │   ├── ..
│   │   ├── channel 7
│   ├── ..                ..
│   ├── csrow 3                # UMC 3
│   │   ├── channel 0
│   │   ├── ..
│   │   ├── channel 7
│   ├── rank 0
│   ├── ..                ..
│   ├── rank 31                # total 32 ranks/dimms from 4 UMCs
├
├── mc 2                # GPU node 1 == mc2
│   ├── ..                # each GPU has total 64 GB

GPU card 2
├── mc 3
│   ├── ..
├── mc 4
│   ├── ..

GPU card 3
├── mc 5
│   ├── ..
├── mc 6
│   ├── ..

GPU card 4
├── mc 7
│   ├── ..
├── mc 8
│   ├── ..

CPU node는 `mc0`입니다. GPU node는 CPU node 뒤에서 순차적으로 enumerate되며, MI200 GPU 하나는 두 node, 즉 두 MC를 가집니다.

GPU node `mc1` 예에서 MC 하나는 UMC에 해당하는 CSROW 네 개를 가집니다. CSROW 하나에는 2GB channel 여덟 개가 있어 UMC당 16GB입니다. CSROW 네 개의 32개 rank/DIMM을 합치면 MC node당 64GB이며, 같은 GPU의 두 MC node 구조가 이어집니다.

나머지 GPU card도 같은 방식으로 `mc3/mc4`, `mc5/mc6`, `mc7/mc8`에 배치됩니다.

MI200 GPU node 내부 용량 구조
계층개수단위 용량합계
GPU cardMC node 2원문 주석: GPU당 64GB원문 표기 보존
GPU MC nodeCSROW/UMC 416GB/UMC64GB
CSROW/UMCchannel 82GB/channel16GB
MC rank322GB/rank64GB

sysfs tree의 MC, CSROW, channel, rank 관계를 수치로 정리했습니다.