← Documents Documentation/ABI/testing/ppc-memtrace GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

PowerPC hardware memtrace debugfs ABI

CONFIG_PPC64_HARDWARE_TRACING에서 NUMA node별 memblock-aligned RAM을 kernel mapping에서 제거해 hardware trace에 사용하고 size·start·trace를 조회한 뒤 다시 online하는 debugfs ABI를 설명합니다.

Source pathDocumentation/ABI/testing/ppc-memtrace
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Hardware trace debugfs root

ppc-memtrace:1-7

powerpc/memtrace는 hardware trace macro용 debugfs files를 담으며 CONFIG_PPC64_HARDWARE_TRACING이 설정되어야 합니다.

NUMA memory removal과 restore

ppc-memtrace:9-20

enable에 memblock-aligned byte size를 쓰면 각 NUMA node에서 그만큼 RAM을 kernel mappings에서 제거하고 node files를 만듭니다. 0을 쓰면 memory를 다시 추가하고 자동 online합니다.

Removed-memory node files

ppc-memtrace:22-46

각 node-id directory는 제거한 memory의 size와 start address를 제공하고 hardware trace macro가 생성한 output을 trace file에 기록합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/kernel/debug/powerpc/memtrace
2 Date: Aug 2017
3 KernelVersion: 4.14
5 Description: This folder contains the relevant debugfs files for the
6 hardware trace macro to use. CONFIG_PPC64_HARDWARE_TRACING
7 must be set.
8
9 What: /sys/kernel/debug/powerpc/memtrace/enable
10 Date: Aug 2017
11 KernelVersion: 4.14
13 Description: Write an integer containing the size in bytes of the memory
14 you want removed from each NUMA node to this file - it must be
15 aligned to the memblock size. This amount of RAM will be removed
16 from each NUMA node in the kernel mappings and the following
17 debugfs files will be created. Once memory is successfully
18 removed from each node, the following files are created. To
19 re-add memory to the kernel, echo 0 into this file (it will be
20 automatically onlined).
21
22 What: /sys/kernel/debug/powerpc/memtrace/<node-id>
23 Date: Aug 2017
24 KernelVersion: 4.14
26 Description: This directory contains information about the removed memory
27 from the specific NUMA node.
28
29 What: /sys/kernel/debug/powerpc/memtrace/<node-id>/size
30 Date: Aug 2017
31 KernelVersion: 4.14
33 Description: This contains the size of the memory removed from the node.
34
35 What: /sys/kernel/debug/powerpc/memtrace/<node-id>/start
36 Date: Aug 2017
37 KernelVersion: 4.14
39 Description: This contains the start address of the removed memory.
40
41 What: /sys/kernel/debug/powerpc/memtrace/<node-id>/trace
42 Date: Aug 2017
43 KernelVersion: 4.14
45 Description: This is where the hardware trace macro will output the trace
46 it generates.
47

3. 한국어 전문 번역

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

PowerPC hardware trace root

1-7
항목내용
What/sys/kernel/debug/powerpc/memtrace
Date2017년 8월
KernelVersion4.14
Contact[email protected]
Description이 folder는 hardware trace macro가 사용할 관련 debugfs file을 포함합니다. CONFIG_PPC64_HARDWARE_TRACING을 설정해야 합니다.

각 NUMA node의 trace memory 예약

9-20
항목내용
What/sys/kernel/debug/powerpc/memtrace/enable
Date2017년 8월
KernelVersion4.14
Contact[email protected]
Description각 NUMA node에서 제거하려는 memory의 byte 단위 크기를 integer로 이 file에 씁니다. 값은 memblock size에 정렬되어야 합니다.
Enable result각 NUMA node에서 이 양의 RAM을 kernel mapping에서 제거합니다. 각 node에서 memory를 성공적으로 제거하면 뒤따르는 debugfs file을 만듭니다.
RestoreMemory를 kernel에 다시 추가하려면 이 file에 0을 echo합니다. Memory는 자동으로 online됩니다.

NUMA node별 removed-memory 정보

22-46
What전문 번역
/sys/kernel/debug/powerpc/memtrace/<node-id>지정 NUMA node에서 제거한 memory에 관한 정보를 담는 directory입니다.
/sys/kernel/debug/powerpc/memtrace/<node-id>/sizeNode에서 제거한 memory의 크기를 담습니다.
/sys/kernel/debug/powerpc/memtrace/<node-id>/start제거한 memory의 start address를 담습니다.
/sys/kernel/debug/powerpc/memtrace/<node-id>/traceHardware trace macro가 생성한 trace를 출력하는 위치입니다.
공통 항목내용
Date2017년 8월
KernelVersion4.14
Contact[email protected]
PowerPC memtrace memory lifecycle
Write memblock-aligned byte size to enableRemove same amount from each NUMA nodeRemove RAM from kernel mappingsCreate node-id directories
node-idsizestarttrace output from hardware macro
Write 0 to enableRe-add removed memoryAutomatically online

Enable size는 모든 NUMA node에 적용되며 제거된 range의 metadata와 trace를 node directory에 노출하고 0 write가 memory를 복원한다.