← Documents Documentation/arch/arm64/kdump.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

Crashkernel Memory Reservation on arm64

Arm64 kdump의 crashkernel 예약 형식, platform별 low/high memory 정의와 자동·분리 예약 탐색 순서를 설명합니다.

Source pathDocumentation/arch/arm64/kdump.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

kdump.rst:1-92

Kdump는 crash 후 별도 kernel을 띄워 vmcore를 수집하므로 boot 초기에 연속 memory를 예약해야 합니다. Arm64에서는 DMA reachability에 따른 low memory가 platform마다 달라 자동 탐색 순서가 중요합니다.

`crashkernel=size` 탐색
지정 sizeLow memory 검색실패 시 high memory 검색High 예약 성공기본 low 128M 추가

권장 옵션의 low/high fallback과 추가 low-memory 예약 흐름입니다.

예약 형식 선택
형식장점주의
`size@offset`위치 결정적점유 시 실패
`size`Layout 지식 불필요High 사용 시 low 128M 추가
`size,high` + `size,low`영역별 제어Low 영역 최소화 가능

고정 위치, 자동 배치, high/low 분리 형식의 차이입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 =======================================
2 crashkernel memory reservation on arm64
3 =======================================
4
5 Author: Baoquan He <bhe@redhat.com>
6
7 Kdump mechanism is used to capture a corrupted kernel vmcore so that
8 it can be subsequently analyzed. In order to do this, a preliminarily
9 reserved memory is needed to pre-load the kdump kernel and boot such
10 kernel if corruption happens.
11
12 That reserved memory for kdump is adapted to be able to minimally
13 accommodate the kdump kernel and the user space programs needed for the
14 vmcore collection.
15
16 Kernel parameter
17 ================
18
19 Through the kernel parameters below, memory can be reserved accordingly
20 during the early stage of the first kernel booting so that a continuous
21 large chunk of memomy can be found. The low memory reservation needs to
22 be considered if the crashkernel is reserved from the high memory area.
23
24 - crashkernel=size@offset
25 - crashkernel=size
26 - crashkernel=size,high crashkernel=size,low
27
28 Low memory and high memory
29 ==========================
30
31 For kdump reservations, low memory is the memory area under a specific
32 limit, usually decided by the accessible address bits of the DMA-capable
33 devices needed by the kdump kernel to run. Those devices not related to
34 vmcore dumping can be ignored. On arm64, the low memory upper bound is
35 not fixed: it is 1G on the RPi4 platform but 4G on most other systems.
36 On special kernels built with CONFIG_ZONE_(DMA|DMA32) disabled, the
37 whole system RAM is low memory. Outside of the low memory described
38 above, the rest of system RAM is considered high memory.
39
40 Implementation
41 ==============
42
43 1) crashkernel=size@offset
44 --------------------------
45
46 The crashkernel memory must be reserved at the user-specified region or
47 fail if already occupied.
48
49
50 2) crashkernel=size
51 -------------------
52
53 The crashkernel memory region will be reserved in any available position
54 according to the search order:
55
56 Firstly, the kernel searches the low memory area for an available region
57 with the specified size.
58
59 If searching for low memory fails, the kernel falls back to searching
60 the high memory area for an available region of the specified size. If
61 the reservation in high memory succeeds, a default size reservation in
62 the low memory will be done. Currently the default size is 128M,
63 sufficient for the low memory needs of the kdump kernel.
64
65 Note: crashkernel=size is the recommended option for crashkernel kernel
66 reservations. The user would not need to know the system memory layout
67 for a specific platform.
68
69 3) crashkernel=size,high crashkernel=size,low
70 ---------------------------------------------
71
72 crashkernel=size,(high|low) are an important supplement to
73 crashkernel=size. They allows the user to specify how much memory needs
74 to be allocated from the high memory and low memory respectively. On
75 many systems the low memory is precious and crashkernel reservations
76 from this area should be kept to a minimum.
77
78 To reserve memory for crashkernel=size,high, searching is first
79 attempted from the high memory region. If the reservation succeeds, the
80 low memory reservation will be done subsequently.
81
82 If reservation from the high memory failed, the kernel falls back to
83 searching the low memory with the specified size in crashkernel=,high.
84 If it succeeds, no further reservation for low memory is needed.
85
86 Notes:
87
88 - If crashkernel=,low is not specified, the default low memory
89 reservation will be done automatically.
90
91 - if crashkernel=0,low is specified, it means that the low memory
92 reservation is omitted intentionally.
93

3. 한국어 전문 번역

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

Kdump 예약 목적

1-15

문서 제목은 `crashkernel memory reservation on arm64`, 작성자는 Baoquan He `<bhe@redhat.com>`입니다.

Kdump는 손상된 kernel의 `vmcore`를 수집해 나중에 분석하는 mechanism입니다. 이를 위해 kdump kernel을 미리 load해 두고 corruption 발생 시 boot할 reserved memory가 필요합니다. 예약 크기는 kdump kernel과 vmcore 수집에 필요한 userspace program을 최소한 수용하도록 조정합니다.

Kernel parameter 형식

16-27

첫 kernel boot의 이른 단계에서 아래 parameter로 연속된 큰 memory chunk를 예약합니다. Crashkernel을 high memory에서 예약한다면 low-memory 예약도 고려해야 합니다.

형식의미
`crashkernel=size@offset`지정 offset에 고정 크기를 예약합니다.
`crashkernel=size`Kernel이 low/high memory에서 자동 탐색합니다.
`crashkernel=size,high crashkernel=size,low`High와 low memory의 예약량을 각각 지정합니다.

Low memory와 high memory

28-39

Kdump에서 low memory는 특정 limit 아래 영역입니다. 보통 kdump kernel 실행에 필요한 DMA-capable device의 접근 address bit가 limit을 결정하며 vmcore dump와 무관한 device는 무시할 수 있습니다.

Arm64의 low-memory upper bound는 고정되지 않습니다. RPi4에서는 1G이고 대부분의 다른 system에서는 4G입니다. `CONFIG_ZONE_(DMA|DMA32)`를 끈 특수 kernel에서는 전체 system RAM이 low memory입니다. 이 범위 밖의 나머지 RAM은 high memory로 봅니다.

crashkernel=size@offset

40-49

이 형식은 사용자가 지정한 region에 crashkernel memory를 예약해야 하며, 해당 영역이 이미 사용 중이면 실패합니다.

crashkernel=size 자동 탐색

50-68

Kernel은 먼저 low-memory 영역에서 지정 크기의 가용 region을 찾습니다. 실패하면 high memory로 fallback합니다. High-memory 예약이 성공하면 low memory에 기본 크기를 추가 예약하며 현재 기본값은 128M으로 kdump kernel의 low-memory 요구에 충분합니다.

`crashkernel=size`는 권장 옵션입니다. 사용자가 platform별 system memory layout을 알 필요가 없습니다.

High·low 크기 개별 지정

69-92

`crashkernel=size,(high|low)`는 `crashkernel=size`를 보완하여 high와 low memory에서 각각 얼마나 할당할지 지정합니다. 많은 system에서 low memory는 귀하므로 이 영역의 crashkernel 예약을 최소화해야 합니다.

`crashkernel=size,high`는 high memory를 먼저 찾고 성공하면 이어서 low memory를 예약합니다. High-memory 예약이 실패하면 `crashkernel=,high`에 지정한 크기로 low memory를 탐색하며, 성공하면 추가 low-memory 예약은 필요하지 않습니다.

  • `crashkernel=,low`를 지정하지 않으면 기본 low-memory 예약을 자동 수행합니다.
  • `crashkernel=0,low`는 low-memory 예약을 의도적으로 생략한다는 뜻입니다.