93 lines · plain
1=======================================2crashkernel memory reservation on arm643=======================================4 5Author: Baoquan He <bhe@redhat.com>6 7Kdump mechanism is used to capture a corrupted kernel vmcore so that8it can be subsequently analyzed. In order to do this, a preliminarily9reserved memory is needed to pre-load the kdump kernel and boot such10kernel if corruption happens.11 12That reserved memory for kdump is adapted to be able to minimally13accommodate the kdump kernel and the user space programs needed for the14vmcore collection.15 16Kernel parameter17================18 19Through the kernel parameters below, memory can be reserved accordingly20during the early stage of the first kernel booting so that a continuous21large chunk of memomy can be found. The low memory reservation needs to22be considered if the crashkernel is reserved from the high memory area.23 24- crashkernel=size@offset25- crashkernel=size26- crashkernel=size,high crashkernel=size,low27 28Low memory and high memory29==========================30 31For kdump reservations, low memory is the memory area under a specific32limit, usually decided by the accessible address bits of the DMA-capable33devices needed by the kdump kernel to run. Those devices not related to34vmcore dumping can be ignored. On arm64, the low memory upper bound is35not fixed: it is 1G on the RPi4 platform but 4G on most other systems.36On special kernels built with CONFIG_ZONE_(DMA|DMA32) disabled, the37whole system RAM is low memory. Outside of the low memory described38above, the rest of system RAM is considered high memory.39 40Implementation41==============42 431) crashkernel=size@offset44--------------------------45 46The crashkernel memory must be reserved at the user-specified region or47fail if already occupied.48 49 502) crashkernel=size51-------------------52 53The crashkernel memory region will be reserved in any available position54according to the search order:55 56Firstly, the kernel searches the low memory area for an available region57with the specified size.58 59If searching for low memory fails, the kernel falls back to searching60the high memory area for an available region of the specified size. If61the reservation in high memory succeeds, a default size reservation in62the low memory will be done. Currently the default size is 128M,63sufficient for the low memory needs of the kdump kernel.64 65Note: crashkernel=size is the recommended option for crashkernel kernel66reservations. The user would not need to know the system memory layout67for a specific platform.68 693) crashkernel=size,high crashkernel=size,low70---------------------------------------------71 72crashkernel=size,(high|low) are an important supplement to73crashkernel=size. They allows the user to specify how much memory needs74to be allocated from the high memory and low memory respectively. On75many systems the low memory is precious and crashkernel reservations76from this area should be kept to a minimum.77 78To reserve memory for crashkernel=size,high, searching is first79attempted from the high memory region. If the reservation succeeds, the80low memory reservation will be done subsequently.81 82If reservation from the high memory failed, the kernel falls back to83searching the low memory with the specified size in crashkernel=,high.84If it succeeds, no further reservation for low memory is needed.85 86Notes:87 88- If crashkernel=,low is not specified, the default low memory89 reservation will be done automatically.90 91- if crashkernel=0,low is specified, it means that the low memory92 reservation is omitted intentionally.93