요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
NUMA affinity와 target node
sysfs-bus-dax:53-72numa_node는 backing-device CPU affinity를, target_node는 online 후 device-dax instance가 생성할 독립 NUMA node를 나타냅니다.
DAX region capacity와 alignment
sysfs-bus-dax:74-101Resolved dax_region 경로에서 volatile hmem available capacity, total bytes와 모든 ranges에 대해 검증되는 region alignment를 제공합니다.
Dynamic region seed lifecycle
sysfs-bus-dax:103-136Zero-capacity unbound seed에서 새 unconfigured dax device를 만들고 size 등을 구성·probe하며 0-sized idle devices만 삭제합니다.
System-memory hotplug memmap placement
sysfs-bus-dax:138-153kmem driver에 넘기기 전에 memmap_on_memory를 설정해 hotplugged device 또는 regular memory에 altmap을 배치하며 kernel configuration과 global parameter를 요구합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/dax/devices/daxX.Y/align
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(RW) Provides a way to specify an alignment for a dax device.
Values allowed are constrained by the physical address ranges
that back the dax device, and also by arch requirements.
What: /sys/bus/dax/devices/daxX.Y/mapping
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(WO) Provides a way to allocate a mapping range under a dax
device. Specified in the format <start>-<end>.
What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/start
What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/end
What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/page_offset
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(RO) A dax device may have multiple constituent discontiguous
address ranges. These are represented by the different
'mappingX' subdirectories. The 'start' attribute indicates the
start physical address for the given range. The 'end' attribute
indicates the end physical address for the given range. The
'page_offset' attribute indicates the offset of the current
range in the dax device.
What: /sys/bus/dax/devices/daxX.Y/resource
Date: June, 2019
KernelVersion: v5.3
Contact: nvdimm@lists.linux.dev
Description:
(RO) The resource attribute indicates the starting physical
address of a dax device. In case of a device with multiple
constituent ranges, it indicates the starting address of the
first range.
What: /sys/bus/dax/devices/daxX.Y/size
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(RW) The size attribute indicates the total size of a dax
device. For creating subdivided dax devices, or for resizing
an existing device, the new size can be written to this as
part of the reconfiguration process.
What: /sys/bus/dax/devices/daxX.Y/numa_node
Date: November, 2019
KernelVersion: v5.5
Contact: nvdimm@lists.linux.dev
Description:
(RO) If NUMA is enabled and the platform has affinitized the
backing device for this dax device, emit the CPU node
affinity for this device.
What: /sys/bus/dax/devices/daxX.Y/target_node
Date: February, 2019
KernelVersion: v5.1
Contact: nvdimm@lists.linux.dev
Description:
(RO) The target-node attribute is the Linux numa-node that a
device-dax instance may create when it is online. Prior to
being online the device's 'numa_node' property reflects the
closest online cpu node which is the typical expectation of a
device 'numa_node'. Once it is online it becomes its own
distinct numa node.
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/available_size
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(RO) The available_size attribute tracks available dax region
capacity. This only applies to volatile hmem devices, not pmem
devices, since pmem devices are defined by nvdimm namespace
boundaries.
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/size
Date: July, 2017
KernelVersion: v5.1
Contact: nvdimm@lists.linux.dev
Description:
(RO) The size attribute indicates the size of a given dax region
in bytes.
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/align
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(RO) The align attribute indicates alignment of the dax region.
Changes on align may not always be valid, when say certain
mappings were created with 2M and then we switch to 1G. This
validates all ranges against the new value being attempted, post
resizing.
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/seed
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(RO) The seed device is a concept for dynamic dax regions to be
able to split the region amongst multiple sub-instances. The
seed device, similar to libnvdimm seed devices, is a device
that starts with zero capacity allocated and unbound to a
driver.
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/create
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(RW) The create interface to the dax region provides a way to
create a new unconfigured dax device under the given region, which
can then be configured (with a size etc.) and then probed.
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/delete
Date: October, 2020
KernelVersion: v5.10
Contact: nvdimm@lists.linux.dev
Description:
(WO) The delete interface for a dax region provides for deletion
of any 0-sized and idle dax devices.
What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/id
Date: July, 2017
KernelVersion: v5.1
Contact: nvdimm@lists.linux.dev
Description:
(RO) The id attribute indicates the region id of a dax region.
What: /sys/bus/dax/devices/daxX.Y/memmap_on_memory
Date: January, 2024
KernelVersion: v6.8
Contact: nvdimm@lists.linux.dev
Description:
(RW) Control the memmap_on_memory setting if the dax device
were to be hotplugged as system memory. This determines whether
the 'altmap' for the hotplugged memory will be placed on the
device being hotplugged (memmap_on_memory=1) or if it will be
placed on regular memory (memmap_on_memory=0). This attribute
must be set before the device is handed over to the 'kmem'
driver (i.e. hotplugged into system-ram). Additionally, this
depends on CONFIG_MHP_MEMMAP_ON_MEMORY, and a globally enabled
memmap_on_memory parameter for memory_hotplug. This is
typically set on the kernel command line -
memory_hotplug.memmap_on_memory set to 'true' or 'force'."
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
DAX device alignment, mappings와 size
1-51| What | Date / Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/dax/devices/daxX.Y/align | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (RW) DAX device의 alignment를 지정하는 방법을 제공합니다. 허용 values는 DAX device를 뒷받침하는 physical address ranges와 architecture requirements에 의해 제한됩니다. |
| /sys/bus/dax/devices/daxX.Y/mapping | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (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_offset | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (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/resource | 2019년 6월 / v5.3 / nvdimm@lists.linux.dev | (RO) DAX device의 시작 physical address를 나타냅니다. Constituent ranges가 여러 개인 device에서는 첫 번째 range의 시작 address입니다. |
| /sys/bus/dax/devices/daxX.Y/size | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (RW) DAX device의 total size를 나타냅니다. Subdivided DAX devices를 만들거나 existing device를 resize할 때 reconfiguration 과정의 일부로 새 size를 쓸 수 있습니다. |
DAX NUMA placement
53-72| What | Date / Kernel / Contact | 전문 번역 |
|---|---|---|
| /sys/bus/dax/devices/daxX.Y/numa_node | 2019년 11월 / v5.5 / nvdimm@lists.linux.dev | (RO) NUMA가 enable되어 있고 platform이 이 DAX device의 backing device에 affinity를 부여했다면 이 device의 CPU node affinity를 출력합니다. |
| /sys/bus/dax/devices/daxX.Y/target_node | 2019년 2월 / v5.1 / nvdimm@lists.linux.dev | (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| What | Date / Kernel / Contact | 전문 번역 |
|---|---|---|
| $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/available_size | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (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/size | 2017년 7월 / v5.1 / nvdimm@lists.linux.dev | (RO) 해당 DAX region의 크기를 bytes로 나타냅니다. |
| $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/align | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (RO) DAX region의 alignment를 나타냅니다. 예를 들어 특정 mappings를 2M로 만든 뒤 1G로 전환하는 경우처럼 align 변경이 항상 유효하지는 않습니다. Resize 후 시도하는 새 value에 대해 모든 ranges를 검증합니다. |
Dynamic DAX region device lifecycle
103-136| What | Date / Kernel / Contact | 전문 번역 |
|---|---|---|
| $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/seed | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (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/create | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (RW) DAX region의 create interface는 해당 region 아래에 새 unconfigured DAX device를 만들며, 이후 size 등을 구성하고 probe할 수 있습니다. |
| $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/delete | 2020년 10월 / v5.10 / nvdimm@lists.linux.dev | (WO) DAX region의 delete interface는 size가 0이고 idle 상태인 DAX devices를 삭제합니다. |
| $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/id | 2017년 7월 / v5.1 / nvdimm@lists.linux.dev | (RO) DAX region의 region id를 나타냅니다. |
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 |
| Date | 2024년 1월 |
| KernelVersion | v6.8 |
| Contact | nvdimm@lists.linux.dev |
| 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
DAX device mapping과 capacity
sysfs-bus-dax:1-51DAX device alignment와 total size를 설정하고 start-end ranges를 mappingX subdirectories로 할당하며 physical resource와 page offsets를 확인합니다.