← Documents Documentation/ABI/testing/sysfs-bus-dax GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Device DAX sysfs ABI

Device DAX의 alignment, discontiguous mappings, size·resource, NUMA placement, dynamic region seed lifecycle와 system-memory hotplug용 memmap placement를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-bus-dax
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

DAX device mapping과 capacity

sysfs-bus-dax:1-51

DAX device alignment와 total size를 설정하고 start-end ranges를 mappingX subdirectories로 할당하며 physical resource와 page offsets를 확인합니다.

NUMA affinity와 target node

sysfs-bus-dax:53-72

numa_node는 backing-device CPU affinity를, target_node는 online 후 device-dax instance가 생성할 독립 NUMA node를 나타냅니다.

DAX region capacity와 alignment

sysfs-bus-dax:74-101

Resolved dax_region 경로에서 volatile hmem available capacity, total bytes와 모든 ranges에 대해 검증되는 region alignment를 제공합니다.

Dynamic region seed lifecycle

sysfs-bus-dax:103-136

Zero-capacity unbound seed에서 새 unconfigured dax device를 만들고 size 등을 구성·probe하며 0-sized idle devices만 삭제합니다.

System-memory hotplug memmap placement

sysfs-bus-dax:138-153

kmem driver에 넘기기 전에 memmap_on_memory를 설정해 hotplugged device 또는 regular memory에 altmap을 배치하며 kernel configuration과 global parameter를 요구합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/dax/devices/daxX.Y/align
2 Date: October, 2020
3 KernelVersion: v5.10
5 Description:
6 (RW) Provides a way to specify an alignment for a dax device.
7 Values allowed are constrained by the physical address ranges
8 that back the dax device, and also by arch requirements.
9
10 What: /sys/bus/dax/devices/daxX.Y/mapping
11 Date: October, 2020
12 KernelVersion: v5.10
14 Description:
15 (WO) Provides a way to allocate a mapping range under a dax
16 device. Specified in the format <start>-<end>.
17
18 What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/start
19 What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/end
20 What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/page_offset
21 Date: October, 2020
22 KernelVersion: v5.10
24 Description:
25 (RO) A dax device may have multiple constituent discontiguous
26 address ranges. These are represented by the different
27 'mappingX' subdirectories. The 'start' attribute indicates the
28 start physical address for the given range. The 'end' attribute
29 indicates the end physical address for the given range. The
30 'page_offset' attribute indicates the offset of the current
31 range in the dax device.
32
33 What: /sys/bus/dax/devices/daxX.Y/resource
34 Date: June, 2019
35 KernelVersion: v5.3
37 Description:
38 (RO) The resource attribute indicates the starting physical
39 address of a dax device. In case of a device with multiple
40 constituent ranges, it indicates the starting address of the
41 first range.
42
43 What: /sys/bus/dax/devices/daxX.Y/size
44 Date: October, 2020
45 KernelVersion: v5.10
47 Description:
48 (RW) The size attribute indicates the total size of a dax
49 device. For creating subdivided dax devices, or for resizing
50 an existing device, the new size can be written to this as
51 part of the reconfiguration process.
52
53 What: /sys/bus/dax/devices/daxX.Y/numa_node
54 Date: November, 2019
55 KernelVersion: v5.5
57 Description:
58 (RO) If NUMA is enabled and the platform has affinitized the
59 backing device for this dax device, emit the CPU node
60 affinity for this device.
61
62 What: /sys/bus/dax/devices/daxX.Y/target_node
63 Date: February, 2019
64 KernelVersion: v5.1
66 Description:
67 (RO) The target-node attribute is the Linux numa-node that a
68 device-dax instance may create when it is online. Prior to
69 being online the device's 'numa_node' property reflects the
70 closest online cpu node which is the typical expectation of a
71 device 'numa_node'. Once it is online it becomes its own
72 distinct numa node.
73
74 What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/available_size
75 Date: October, 2020
76 KernelVersion: v5.10
78 Description:
79 (RO) The available_size attribute tracks available dax region
80 capacity. This only applies to volatile hmem devices, not pmem
81 devices, since pmem devices are defined by nvdimm namespace
82 boundaries.
83
84 What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/size
85 Date: July, 2017
86 KernelVersion: v5.1
88 Description:
89 (RO) The size attribute indicates the size of a given dax region
90 in bytes.
91
92 What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/align
93 Date: October, 2020
94 KernelVersion: v5.10
96 Description:
97 (RO) The align attribute indicates alignment of the dax region.
98 Changes on align may not always be valid, when say certain
99 mappings were created with 2M and then we switch to 1G. This
100 validates all ranges against the new value being attempted, post
101 resizing.
102
103 What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/seed
104 Date: October, 2020
105 KernelVersion: v5.10
107 Description:
108 (RO) The seed device is a concept for dynamic dax regions to be
109 able to split the region amongst multiple sub-instances. The
110 seed device, similar to libnvdimm seed devices, is a device
111 that starts with zero capacity allocated and unbound to a
112 driver.
113
114 What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/create
115 Date: October, 2020
116 KernelVersion: v5.10
118 Description:
119 (RW) The create interface to the dax region provides a way to
120 create a new unconfigured dax device under the given region, which
121 can then be configured (with a size etc.) and then probed.
122
123 What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/delete
124 Date: October, 2020
125 KernelVersion: v5.10
127 Description:
128 (WO) The delete interface for a dax region provides for deletion
129 of any 0-sized and idle dax devices.
130
131 What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/id
132 Date: July, 2017
133 KernelVersion: v5.1
135 Description:
136 (RO) The id attribute indicates the region id of a dax region.
137
138 What: /sys/bus/dax/devices/daxX.Y/memmap_on_memory
139 Date: January, 2024
140 KernelVersion: v6.8
142 Description:
143 (RW) Control the memmap_on_memory setting if the dax device
144 were to be hotplugged as system memory. This determines whether
145 the 'altmap' for the hotplugged memory will be placed on the
146 device being hotplugged (memmap_on_memory=1) or if it will be
147 placed on regular memory (memmap_on_memory=0). This attribute
148 must be set before the device is handed over to the 'kmem'
149 driver (i.e. hotplugged into system-ram). Additionally, this
150 depends on CONFIG_MHP_MEMMAP_ON_MEMORY, and a globally enabled
151 memmap_on_memory parameter for memory_hotplug. This is
152 typically set on the kernel command line -
153 memory_hotplug.memmap_on_memory set to 'true' or 'force'."
154

3. 한국어 전문 번역

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

DAX device alignment, mappings와 size

1-51
WhatDate / Kernel / Contact전문 번역
/sys/bus/dax/devices/daxX.Y/align2020년 10월 / v5.10 / [email protected](RW) DAX device의 alignment를 지정하는 방법을 제공합니다. 허용 values는 DAX device를 뒷받침하는 physical address ranges와 architecture requirements에 의해 제한됩니다.
/sys/bus/dax/devices/daxX.Y/mapping2020년 10월 / v5.10 / [email protected](WO) DAX device 아래에 mapping range를 allocate하는 방법을 제공합니다. <start>-<end> 형식으로 지정합니다.
/sys/bus/dax/devices/daxX.Y/mapping[0..N]/start /sys/bus/dax/devices/daxX.Y/mapping[0..N]/end /sys/bus/dax/devices/daxX.Y/mapping[0..N]/page_offset2020년 10월 / v5.10 / [email protected](RO) DAX device는 서로 떨어진 여러 constituent address ranges를 가질 수 있으며 서로 다른 mappingX subdirectories로 나타냅니다. start는 해당 range의 시작 physical address, end는 끝 physical address, page_offset은 DAX device에서 현재 range의 offset을 나타냅니다.
/sys/bus/dax/devices/daxX.Y/resource2019년 6월 / v5.3 / [email protected](RO) DAX device의 시작 physical address를 나타냅니다. Constituent ranges가 여러 개인 device에서는 첫 번째 range의 시작 address입니다.
/sys/bus/dax/devices/daxX.Y/size2020년 10월 / v5.10 / [email protected](RW) DAX device의 total size를 나타냅니다. Subdivided DAX devices를 만들거나 existing device를 resize할 때 reconfiguration 과정의 일부로 새 size를 쓸 수 있습니다.

DAX NUMA placement

53-72
WhatDate / Kernel / Contact전문 번역
/sys/bus/dax/devices/daxX.Y/numa_node2019년 11월 / v5.5 / [email protected](RO) NUMA가 enable되어 있고 platform이 이 DAX device의 backing device에 affinity를 부여했다면 이 device의 CPU node affinity를 출력합니다.
/sys/bus/dax/devices/daxX.Y/target_node2019년 2월 / v5.1 / [email protected](RO) Device-dax instance가 online일 때 만들 수 있는 Linux numa-node입니다. Online 전에는 device의 numa_node property가 가장 가까운 online CPU node를 반영하며, 이는 device numa_node의 일반적인 의미입니다. Online이 되면 자체적인 별도 NUMA node가 됩니다.

Resolved DAX region capacity와 alignment

74-101
WhatDate / Kernel / Contact전문 번역
$(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/available_size2020년 10월 / v5.10 / [email protected](RO) Available_size는 사용할 수 있는 DAX region capacity를 추적합니다. Pmem devices는 nvdimm namespace boundaries로 정의되므로 이는 pmem이 아닌 volatile hmem devices에만 적용됩니다.
$(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/size2017년 7월 / v5.1 / [email protected](RO) 해당 DAX region의 크기를 bytes로 나타냅니다.
$(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/align2020년 10월 / v5.10 / [email protected](RO) DAX region의 alignment를 나타냅니다. 예를 들어 특정 mappings를 2M로 만든 뒤 1G로 전환하는 경우처럼 align 변경이 항상 유효하지는 않습니다. Resize 후 시도하는 새 value에 대해 모든 ranges를 검증합니다.

Dynamic DAX region device lifecycle

103-136
WhatDate / Kernel / Contact전문 번역
$(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/seed2020년 10월 / v5.10 / [email protected](RO) Seed device는 dynamic DAX region을 여러 sub-instances로 나누기 위한 개념입니다. Libnvdimm seed devices와 비슷하게 capacity가 0인 상태로 시작하고 driver에 bind되지 않은 device입니다.
$(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/create2020년 10월 / v5.10 / [email protected](RW) DAX region의 create interface는 해당 region 아래에 새 unconfigured DAX device를 만들며, 이후 size 등을 구성하고 probe할 수 있습니다.
$(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/delete2020년 10월 / v5.10 / [email protected](WO) DAX region의 delete interface는 size가 0이고 idle 상태인 DAX devices를 삭제합니다.
$(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/id2017년 7월 / v5.1 / [email protected](RO) DAX region의 region id를 나타냅니다.
Dynamic DAX device lifecycle
Zero-capacity unbound seedcreateConfigure align and sizeAllocate mappingsProbe device
Configured deviceUnbind and make idleSet size to 0delete

Seed 또는 create interface로 unconfigured device를 준비하고 capacity와 mappings를 설정한 뒤 probe하며, 삭제는 zero-size idle 상태에서만 가능합니다.

DAX hotplug memmap_on_memory

138-153
항목전문 번역
What/sys/bus/dax/devices/daxX.Y/memmap_on_memory
Date2024년 1월
KernelVersionv6.8
Contact[email protected]
Description(RW) DAX device를 system memory로 hotplug할 때 memmap_on_memory 설정을 제어합니다. Hotplugged memory의 altmap을 hotplug되는 device 위에 둘지(memmap_on_memory=1), regular memory에 둘지(memmap_on_memory=0)를 결정합니다. Device를 kmem driver에 넘겨 system-ram으로 hotplug하기 전에 설정해야 합니다. 또한 CONFIG_MHP_MEMMAP_ON_MEMORY와 memory_hotplug의 globally enabled memmap_on_memory parameter가 필요합니다. 일반적으로 kernel command line에서 memory_hotplug.memmap_on_memory를 true 또는 force로 설정합니다.
memory_hotplug.memmap_on_memory=true
# 또는
memory_hotplug.memmap_on_memory=force