요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Online state and valid zones
sysfs-devices-memory:42-88Root는 memory block을 online/offline하고 online_movable 또는 online_kernel로 target zone을 선택하며 valid_zones에서 current/default zone과 offline 가능성을 확인합니다.
Memory-section and NUMA-node links
sysfs-devices-memory:89-113CONFIG_NUMA에서는 memory section에서 node로, node에서 memory section으로 향하는 reciprocal symbolic link가 생성됩니다.
Crash-kernel hotplug updates
sysfs-devices-memory:114-120crash_hotplug는 memory hotplug·online event에서 kernel이 kexec segment를 갱신해 kdump kernel reload를 피할 수 있는지 표시합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/devices/system/memory
Date: June 2008
Contact: Badari Pulavarty <[email protected]>
Description:
The /sys/devices/system/memory contains a snapshot of the
internal state of the kernel memory blocks. Files could be
added or removed dynamically to represent hot-add/remove
operations.
Users: hotplug memory add/remove tools
http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
What: /sys/devices/system/memory/memoryX/removable
Date: June 2008
Contact: Badari Pulavarty <[email protected]>
Description:
The file /sys/devices/system/memory/memoryX/removable is a
legacy interface used to indicated whether a memory block is
likely to be offlineable or not. Newer kernel versions return
"1" if and only if the kernel supports memory offlining.
Users: hotplug memory remove tools
http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
lsmem/chmem part of util-linux
What: /sys/devices/system/memory/memoryX/phys_device
Date: September 2008
Contact: Badari Pulavarty <[email protected]>
Description:
The file /sys/devices/system/memory/memoryX/phys_device
is read-only; it is a legacy interface only ever used on s390x
to expose the covered storage increment.
Users: Legacy s390-tools lsmem/chmem
What: /sys/devices/system/memory/memoryX/phys_index
Date: September 2008
Contact: Badari Pulavarty <[email protected]>
Description:
The file /sys/devices/system/memory/memoryX/phys_index
is read-only and contains the section ID in hexadecimal
which is equivalent to decimal X contained in the
memory section directory name.
What: /sys/devices/system/memory/memoryX/state
Date: September 2008
Contact: Badari Pulavarty <[email protected]>
Description:
The file /sys/devices/system/memory/memoryX/state
is read-write. When read, it returns the online/offline
state of the memory block. When written, root can toggle
the online/offline state of a memory block using the following
commands::
# echo online > /sys/devices/system/memory/memoryX/state
# echo offline > /sys/devices/system/memory/memoryX/state
On newer kernel versions, advanced states can be specified
when onlining to select a target zone: "online_movable"
selects the movable zone. "online_kernel" selects the
applicable kernel zone (DMA, DMA32, or Normal). However,
after successfully setting one of the advanced states,
reading the file will return "online"; the zone information
can be obtained via "valid_zones" instead.
While onlining is unlikely to fail, there are no guarantees
that offlining will succeed. Offlining is more likely to
succeed if "valid_zones" indicates "Movable".
Users: hotplug memory remove tools
http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
What: /sys/devices/system/memory/memoryX/valid_zones
Date: July 2014
Contact: Zhang Zhen <[email protected]>
Description:
The file /sys/devices/system/memory/memoryX/valid_zones is
read-only.
For online memory blocks, it returns in which zone memory
provided by a memory block is managed. If multiple zones
apply (not applicable for hotplugged memory), "None" is returned
and the memory block cannot be offlined.
For offline memory blocks, it returns by which zone memory
provided by a memory block can be managed when onlining.
The first returned zone ("default") will be used when setting
the state of an offline memory block to "online". Only one of
the kernel zones (DMA, DMA32, Normal) is applicable for a single
memory block.
What: /sys/devices/system/memoryX/nodeY
Date: October 2009
Contact: Linux Memory Management list <[email protected]>
Description:
When CONFIG_NUMA is enabled, a symbolic link that
points to the corresponding NUMA node directory.
For example, the following symbolic link is created for
memory section 9 on node0:
/sys/devices/system/memory/memory9/node0 -> ../../node/node0
What: /sys/devices/system/node/nodeX/memoryY
Date: September 2008
Contact: Gary Hade <[email protected]>
Description:
When CONFIG_NUMA is enabled
/sys/devices/system/node/nodeX/memoryY is a symbolic link that
points to the corresponding /sys/devices/system/memory/memoryY
memory section directory. For example, the following symbolic
link is created for memory section 9 on node0.
/sys/devices/system/node/node0/memory9 -> ../../memory/memory9
What: /sys/devices/system/memory/crash_hotplug
Date: Aug 2023
Contact: Linux kernel mailing list <[email protected]>
Description:
(RO) indicates whether or not the kernel updates relevant kexec
segments on memory hot un/plug and/or on/offline events, avoiding the
need to reload kdump kernel.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Dynamic memory-block snapshot
1-11| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memory |
| Date | 2008년 6월 |
| Contact | Badari Pulavarty <[email protected]> |
| Description | /sys/devices/system/memory는 kernel memory block internal state의 snapshot을 담습니다. Hot-add/remove operation을 나타내기 위해 file이 동적으로 추가·제거될 수 있습니다. |
| Users | Hotplug memory add/remove tools; http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils |
Legacy memory-block removable indication
12-23| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memory/memoryX/removable |
| Date | 2008년 6월 |
| Contact | Badari Pulavarty <[email protected]> |
| Description | Memory block을 offline할 가능성이 있는지 나타내는 legacy interface입니다. Newer kernel version은 kernel이 memory offlining을 지원할 때만 1을 반환합니다. |
| Users | Hotplug memory remove tools; powerpc-utils; util-linux의 lsmem/chmem |
Legacy s390x storage increment
24-32| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memory/memoryX/phys_device |
| Date | 2008년 9월 |
| Contact | Badari Pulavarty <[email protected]> |
| Description | Read-only legacy interface이며 s390x에서만 covered storage increment를 expose하는 데 사용되었습니다. |
| Users | Legacy s390-tools lsmem/chmem |
Hexadecimal memory-section ID
33-41| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memory/memoryX/phys_index |
| Date | 2008년 9월 |
| Contact | Badari Pulavarty <[email protected]> |
| Description | Read-only이며 section ID를 hexadecimal로 담습니다. 이 값은 memory section directory name의 decimal X와 같습니다. |
Dynamic block directory와 세 legacy/identity field의 역할입니다.
Online and offline memory-block state
42-69| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memory/memoryX/state |
| Date | 2008년 9월 |
| Contact | Badari Pulavarty <[email protected]> |
| Description | Read/write file입니다. Read하면 memory block의 online/offline state를 반환합니다. Root는 online 또는 offline command를 write하여 state를 toggle할 수 있습니다. Newer kernel에서는 onlining할 때 target zone을 선택하는 advanced state도 지정할 수 있습니다. online_movable은 Movable zone을, online_kernel은 적용 가능한 kernel zone(DMA, DMA32 또는 Normal)을 선택합니다. Advanced state를 성공적으로 set한 뒤 read하면 "online"을 반환하며 zone 정보는 valid_zones에서 얻습니다. Onlining은 fail할 가능성이 낮지만 offlining 성공은 보장되지 않습니다. valid_zones가 "Movable"을 나타내면 offlining 성공 가능성이 더 높습니다. |
| Users | Hotplug memory remove tools; powerpc-utils |
# echo online > /sys/devices/system/memory/memoryX/state
# echo offline > /sys/devices/system/memory/memoryX/state
Current or selectable memory zones
70-88| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memory/memoryX/valid_zones |
| Date | 2014년 7월 |
| Contact | Zhang Zhen <[email protected]> |
| Description | Read-only file입니다. Online memory block에서는 block이 제공하는 memory를 어느 zone에서 관리하는지 반환합니다. 여러 zone이 적용되면(hotplugged memory에는 해당하지 않음) "None"을 반환하며 memory block을 offline할 수 없습니다. Offline memory block에서는 onlining할 때 어느 zone에서 관리할 수 있는지 반환합니다. 첫 번째 returned zone인 "default"는 offline block state를 "online"으로 설정할 때 사용됩니다. 한 memory block에는 kernel zone DMA, DMA32, Normal 중 하나만 적용됩니다. |
Requested state와 zone-selection semantics입니다.
valid_zones를 보고 target 또는 offlining 가능성을 판단합니다.
Memory section to NUMA node link
89-101| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memoryX/nodeY |
| Date | 2009년 10월 |
| Contact | Linux Memory Management list <[email protected]> |
| Description | CONFIG_NUMA가 enable되어 있으면 corresponding NUMA node directory를 가리키는 symbolic link입니다. 예를 들어 node0의 memory section 9에는 아래 link가 생성됩니다. |
/sys/devices/system/memory/memory9/node0 -> ../../node/node0
NUMA node to memory section link
102-113| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/node/nodeX/memoryY |
| Date | 2008년 9월 |
| Contact | Gary Hade <[email protected]> |
| Description | CONFIG_NUMA가 enable되어 있으면 corresponding /sys/devices/system/memory/memoryY memory section directory를 가리키는 symbolic link입니다. 예를 들어 node0의 memory section 9에는 아래 link가 생성됩니다. |
/sys/devices/system/node/node0/memory9 -> ../../memory/memory9
Memory-section view와 NUMA-node view가 서로의 directory를 symlink로 연결합니다.
Crash-kernel hotplug segment updates
114-120| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/system/memory/crash_hotplug |
| Date | 2023년 8월 |
| Contact | Linux kernel mailing list <[email protected]> |
| Description | (RO) Memory hot un/plug 및/또는 on/offline event에서 kernel이 관련 kexec segment를 update하여 kdump kernel을 reload할 필요를 없애는지 나타냅니다. |
Supported kernel은 memory topology change를 kexec segment에 반영합니다.
Memory-block tree and legacy metadata
sysfs-devices-memory:1-41Memory tree는 hot-add/remove에 따라 동적으로 바뀌며 removable, s390x storage increment와 hexadecimal section ID 같은 legacy metadata를 제공합니다.