← Documents Documentation/ABI/testing/sysfs-edac-memory-repair GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

EDAC memory-media repair sysfs ABI

Soft·hard PPR와 memory sparing의 persistence, HPA·DPA, nibble mask, topology coordinates와 repair trigger를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-edac-memory-repair
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Repair model and persistence

sysfs-edac-memory-repair:1-82

PPR는 failing location을 spare row로 대체하며 soft repair는 temporary, hard repair는 permanent이고 runtime safety에 따라 memory offlining이 필요할 수 있습니다.

Address and topology selection

sysfs-edac-memory-repair:83-193

Error records가 HPA·DPA, nibble mask와 필요한 DRAM topology coordinates를 제공하며 active host mapping이 없으면 DPA를 사용합니다.

Issue the selected repair

sysfs-edac-memory-repair:194-206

Required attributes를 모두 설정한 뒤 repair에 1을 써서 operation을 issue하며 resources가 부족하면 실패할 수 있습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/edac/devices/<dev-name>/mem_repairX
2 Date: March 2025
3 KernelVersion: 6.15
5 Description:
6 The sysfs EDAC bus devices /<dev-name>/mem_repairX subdirectory
7 pertains to the memory media repair features control, such as
8 PPR (Post Package Repair), memory sparing etc, where <dev-name>
9 directory corresponds to a device registered with the EDAC
10 device driver for the memory repair features.
11
12 Post Package Repair is a maintenance operation requests the memory
13 device to perform a repair operation on its media. It is a memory
14 self-healing feature that fixes a failing memory location by
15 replacing it with a spare row in a DRAM device. For example, a
16 CXL memory device with DRAM components that support PPR features may
17 implement PPR maintenance operations. DRAM components may support
18 two types of PPR functions: hard PPR, for a permanent row repair, and
19 soft PPR, for a temporary row repair. Soft PPR may be much faster
20 than hard PPR, but the repair is lost with a power cycle.
21
22 The sysfs attributes nodes for a repair feature are only
23 present if the parent driver has implemented the corresponding
24 attr callback function and provided the necessary operations
25 to the EDAC device driver during registration.
26
27 In some states of system configuration (e.g. before address
28 decoders have been configured), memory devices (e.g. CXL)
29 may not have an active mapping in the main host address
30 physical address map. As such, the memory to repair must be
31 identified by a device specific physical addressing scheme
32 using a device physical address(DPA). The DPA and other control
33 attributes to use will be presented in related error records.
34
35 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/repair_type
36 Date: March 2025
37 KernelVersion: 6.15
39 Description:
40 (RO) Memory repair type. For eg. post package repair,
41 memory sparing etc. Valid values are:
42
43 - ppr - Post package repair.
44
45 - cacheline-sparing
46
47 - row-sparing
48
49 - bank-sparing
50
51 - rank-sparing
52
53 - All other values are reserved.
54
55 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/persist_mode
56 Date: March 2025
57 KernelVersion: 6.15
59 Description:
60 (RW) Get/Set the current persist repair mode set for a
61 repair function. Persist repair modes supported in the
62 device, based on a memory repair function, either is temporary,
63 which is lost with a power cycle or permanent. Valid values are:
64
65 - 0 - Soft memory repair (temporary repair).
66
67 - 1 - Hard memory repair (permanent repair).
68
69 - All other values are reserved.
70
71 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/repair_safe_when_in_use
72 Date: March 2025
73 KernelVersion: 6.15
75 Description:
76 (RO) True if memory media is accessible and data is retained
77 during the memory repair operation.
78 The data may not be retained and memory requests may not be
79 correctly processed during a repair operation. In such case
80 repair operation can not be executed at runtime. The memory
81 must be taken offline.
82
83 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/hpa
84 Date: March 2025
85 KernelVersion: 6.15
87 Description:
88 (RW) Host Physical Address (HPA) of the memory to repair.
89 The HPA to use will be provided in related error records.
90
91 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/dpa
92 Date: March 2025
93 KernelVersion: 6.15
95 Description:
96 (RW) Device Physical Address (DPA) of the memory to repair.
97 The specific DPA to use will be provided in related error
98 records.
99
100 In some states of system configuration (e.g. before address
101 decoders have been configured), memory devices (e.g. CXL)
102 may not have an active mapping in the main host address
103 physical address map. As such, the memory to repair must be
104 identified by a device specific physical addressing scheme
105 using a DPA. The device physical address(DPA) to use will be
106 presented in related error records.
107
108 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/nibble_mask
109 Date: March 2025
110 KernelVersion: 6.15
112 Description:
113 (RW) Read/Write Nibble mask of the memory to repair.
114 Nibble mask identifies one or more nibbles in error on the
115 memory bus that produced the error event. Nibble Mask bit 0
116 shall be set if nibble 0 on the memory bus produced the
117 event, etc. For example, CXL PPR and sparing, a nibble mask
118 bit set to 1 indicates the request to perform repair
119 operation in the specific device. All nibble mask bits set
120 to 1 indicates the request to perform the operation in all
121 devices. Eg. for CXL memory repair, the specific value of
122 nibble mask to use will be provided in related error records.
123 For more details, See nibble mask field in CXL spec ver 3.1,
124 section 8.2.9.7.1.2 Table 8-103 soft PPR and section
125 8.2.9.7.1.3 Table 8-104 hard PPR, section 8.2.9.7.1.4
126 Table 8-105 memory sparing.
127
128 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/min_hpa
129 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/max_hpa
130 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/min_dpa
131 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/max_dpa
132 Date: March 2025
133 KernelVersion: 6.15
135 Description:
136 (RW) The supported range of memory address that is to be
137 repaired. The memory device may give the supported range of
138 attributes to use and it will depend on the memory device
139 and the portion of memory to repair.
140 The userspace may receive the specific value of attributes
141 to use for a repair operation from the memory device via
142 related error records and trace events, for eg. CXL DRAM
143 and CXL general media error records in CXL memory devices.
144
145 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/bank_group
146 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/bank
147 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/rank
148 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/row
149 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/column
150 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/channel
151 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/sub_channel
152 Date: March 2025
153 KernelVersion: 6.15
155 Description:
156 (RW) The control attributes for the memory to be repaired.
157 The specific value of attributes to use depends on the
158 portion of memory to repair and will be reported to the host
159 in related error records and be available to userspace
160 in trace events, such as CXL DRAM and CXL general media
161 error records of CXL memory devices.
162
163 When readng back these attributes, it returns the current
164 value of memory requested to be repaired.
165
166 bank_group - The bank group of the memory to repair.
167
168 bank - The bank number of the memory to repair.
169
170 rank - The rank of the memory to repair. Rank is defined as a
171 set of memory devices on a channel that together execute a
172 transaction.
173
174 row - The row number of the memory to repair.
175
176 column - The column number of the memory to repair.
177
178 channel - The channel of the memory to repair. Channel is
179 defined as an interface that can be independently accessed
180 for a transaction.
181
182 sub_channel - The subchannel of the memory to repair.
183
184 The requirement to set these attributes varies based on the
185 repair function. The attributes in sysfs are not present
186 unless required for a repair function.
187
188 For example, CXL spec ver 3.1, Section 8.2.9.7.1.2 Table 8-103
189 soft PPR and Section 8.2.9.7.1.3 Table 8-104 hard PPR operations,
190 these attributes are not required to set. CXL spec ver 3.1,
191 Section 8.2.9.7.1.4 Table 8-105 memory sparing, these attributes
192 are required to set based on memory sparing granularity.
193
194 What: /sys/bus/edac/devices/<dev-name>/mem_repairX/repair
195 Date: March 2025
196 KernelVersion: 6.15
198 Description:
199 (WO) Issue the memory repair operation for the specified
200 memory repair attributes. The operation may fail if resources
201 are insufficient based on the requirements of the memory
202 device and repair function.
203
204 - 1 - Issue the repair operation.
205
206 - All other values are reserved.
207

3. 한국어 전문 번역

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

EDAC memory-repair feature directory

1-34
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX
Date2025년 3월
KernelVersion6.15
Contact[email protected]
Description`/<dev-name>/mem_repairX` subdirectory는 PPR(Post Package Repair), memory sparing 등 memory-media repair controls에 대응하며 `<dev-name>`은 repair feature를 위해 EDAC driver에 registered된 device입니다. PPR은 failing memory location을 DRAM spare row로 대체하는 self-healing maintenance operation입니다. Hard PPR은 permanent row repair이고 soft PPR은 더 빠를 수 있지만 power cycle 때 사라지는 temporary repair입니다. Parent driver가 callback과 operations를 제공한 attributes만 노출됩니다. Address decoder가 아직 configured되지 않은 상태 등 host physical map에 active mapping이 없으면 related error record가 제공하는 DPA(Device Physical Address)와 device-specific physical addressing으로 repair target을 지정합니다.
AccessAttribute subdirectory
Memory-repair persistence
RepairPersistenceTypical behavior
Soft PPRLost on power cycleTemporary and faster
Hard PPRPermanentPermanent row replacement

Soft와 hard PPR의 lifetime 차이입니다.

Memory-repair target selection
Read related error recordCheck active host physical mappingUse HPA when mapped or DPA when unmappedSet required repair attributesIssue repair

Host mapping 존재 여부에 따라 HPA 또는 DPA 기반으로 target을 지정합니다.

EDAC memory-repair type

35-54
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/repair_type
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionMemory repair type을 표시합니다. Valid values는 `ppr`(Post Package Repair), `cacheline-sparing`, `row-sparing`, `bank-sparing`, `rank-sparing`이며 다른 값은 reserved입니다.
AccessRead-only
EDAC memory-repair types
ValueRepair function
pprPost Package Repair
cacheline-sparingCache-line sparing
row-sparingRow sparing
bank-sparingBank sparing
rank-sparingRank sparing

Repair 또는 sparing granularity입니다.

EDAC memory-repair persistence mode

55-70
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/persist_mode
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionRepair function의 current persist mode를 읽거나 설정합니다. 값 0은 power cycle 때 사라지는 soft temporary repair이고 값 1은 permanent hard repair이며 다른 값은 reserved입니다.
AccessRead-write
Repair persistence values
ValueModePersistence
0Soft repairTemporary
1Hard repairPermanent
OtherReservedInvalid

Soft와 hard repair mode encoding입니다.

Memory-repair runtime safety

71-82
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/repair_safe_when_in_use
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionMemory repair 중에도 memory media에 access할 수 있고 data가 retained되면 true입니다. Repair operation 중 data가 retained되지 않거나 requests가 올바르게 처리되지 않을 수 있으면 runtime repair를 실행할 수 없고 해당 memory를 offline해야 합니다.
AccessRead-only
Runtime repair safety decision
Reported safetyRequired handling
TrueRuntime repair allowed
FalseTake memory offline before repair

In-use repair 가능 여부와 required action입니다.

Memory-repair host physical address

83-90
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/hpa
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionRepair할 memory의 HPA(Host Physical Address)입니다. 사용할 HPA는 related error records에서 제공됩니다.
AccessRead-write

Memory-repair device physical address

91-107
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/dpa
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionRepair할 memory의 DPA(Device Physical Address)입니다. Address decoder configuration 전의 CXL device처럼 main host physical-address map에 active mapping이 없으면 device-specific DPA로 target을 식별해야 하며 사용할 값은 related error records에서 제공됩니다.
AccessRead-write

Memory-repair nibble mask

108-127
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/nibble_mask
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionRepair할 memory의 nibble mask를 읽거나 씁니다. Bit N은 memory bus의 nibble N이 error event를 만들었음을 나타냅니다. CXL PPR와 sparing에서는 bit 1이 specific device의 repair request를 뜻하고 모든 bits가 1이면 모든 devices에 operation을 요청합니다. 사용할 value는 related error records에서 제공됩니다. 자세한 정의는 CXL 3.1 section 8.2.9.7.1.2 Table 8-103(soft PPR), 8.2.9.7.1.3 Table 8-104(hard PPR), 8.2.9.7.1.4 Table 8-105(memory sparing)를 참조합니다.
AccessRead-write
Memory-repair nibble mask
MaskMeaning
Bit N = 1Select nibble/device N
All bits = 1Request operation on all devices
Exact maskObtain from related error record

Bit selection과 all-device request입니다.

Supported memory-repair address ranges

128-144
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/min_hpa
What/sys/bus/edac/devices/<dev-name>/mem_repairX/max_hpa
What/sys/bus/edac/devices/<dev-name>/mem_repairX/min_dpa
What/sys/bus/edac/devices/<dev-name>/mem_repairX/max_dpa
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionRepair할 수 있는 supported memory-address range입니다. Supported attributes와 ranges는 memory device와 repair target portion에 따라 달라집니다. Userspace는 CXL memory device의 CXL DRAM 또는 general-media error records와 trace events 등을 통해 operation에 사용할 specific values를 받을 수 있습니다.
AccessRead-write
Memory-repair address boundaries
Address spaceMinimumMaximum
Host physicalmin_hpamax_hpa
Device physicalmin_dpamax_dpa

Host와 device address-space bounds입니다.

Memory-repair topology coordinates

145-193
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/bank_group
What/sys/bus/edac/devices/<dev-name>/mem_repairX/bank
What/sys/bus/edac/devices/<dev-name>/mem_repairX/rank
What/sys/bus/edac/devices/<dev-name>/mem_repairX/row
What/sys/bus/edac/devices/<dev-name>/mem_repairX/column
What/sys/bus/edac/devices/<dev-name>/mem_repairX/channel
What/sys/bus/edac/devices/<dev-name>/mem_repairX/sub_channel
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionRepair target의 topology coordinates를 설정하고 current requested values를 읽습니다. `bank_group`은 bank group, `bank`는 bank number, `rank`는 한 channel에서 transaction을 함께 실행하는 memory-device set, `row`와 `column`은 해당 coordinates, `channel`은 independently accessed transaction interface, `sub_channel`은 subchannel입니다. Required attributes는 repair function에 따라 다르고 필요하지 않은 sysfs nodes는 나타나지 않습니다. CXL 3.1 soft/hard PPR에서는 이 attributes가 필요하지 않지만 memory sparing에서는 sparing granularity에 따라 설정해야 합니다. Values는 related error records와 trace events에서 userspace로 전달됩니다.
AccessRead-write
Memory-repair topology fields
FieldCoordinate
channel / sub_channelTransaction interface
rankDevices executing together
bank_group / bankDRAM bank hierarchy
row / columnCell-array location

Repair target을 지정하는 hierarchy입니다.

CXL repair-coordinate requirements
FunctionTopology attributes
Soft PPRNot required
Hard PPRNot required
Memory sparingRequired according to granularity

Repair function에 따른 topology attribute requirement입니다.

Issue memory-repair operation

194-206
항목한국어 전문 번역
What/sys/bus/edac/devices/<dev-name>/mem_repairX/repair
Date2025년 3월
KernelVersion6.15
Contact[email protected]
DescriptionSpecified memory-repair attributes에 대해 operation을 issue합니다. 값 1을 쓰면 repair를 실행하고 다른 값은 reserved입니다. Memory device와 repair function requirements에 비해 resources가 insufficient하면 operation이 fail할 수 있습니다.
AccessWrite-only
Valid value1