Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

verify kdump using patchset: support reserving crashkernel above 4G on arm64 kdump #164

Open
adamliyi opened this issue Apr 13, 2022 · 3 comments

Comments

@adamliyi
Copy link
Collaborator

adamliyi commented Apr 13, 2022

Test kdump using latest upstream linus tree.

  1. set kernel option: crashkernel=4G. Boot kernel and dmesg | grep crashkernel. Very likely crashkernel memory cannot be reserved, since by default on arm64 crashkernel will allocate bellow 4G.
  2. Apply upstream patch: [PATCH v21 0/5] support reserving crashkernel above 4G on arm64 kdump: https://lkml.org/lkml/2022/2/26/350
  3. Try option: crashkernel=4G
  4. Try option: crashkernel=4G crashkernel=16M,low
  5. Try kdump if crashkernel memory can be reserved.

Before the patch, these option should fail:

`crashkernel=4G`  // fail. by default kernel try to allocate bellow 4GB
`crashkernel=4G crashkernel=16M,low` //fail, low option not supported

After the patch, bellow option should be supported:

The test cases are as follows: (Please update the kexec tool to the latest version)
1) crashkernel=4G						//high=4G, low=256M
2) crashkernel=4G crashkernel=512M,high crashkernel=512M,low	//high=4G, low=256M, high and low are ignored
3) crashkernel=4G crashkernel=512M,high				//high=4G, low=256M, high is ignored
4) crashkernel=4G crashkernel=512M,low				//high=4G, low=256M, low is ignored
5) crashkernel=4G@0xe0000000					//high=0G, low=0M, cannot allocate, failed
6) crashkernel=512M						//high=0G, low=512M
7) crashkernel=128M						//high=0G, low=128M
8) crashkernel=512M@0xde000000		//512M@3552M		//high=0G, low=512M
9) crashkernel=4G,high						//high=4G, low=256M
a) crashkernel=4G,high crashkernel=512M,low			//high=4G, low=512M
b) crashkernel=512M,high crashkernel=128M,low			//high=512M, low=128M
c) crashkernel=128M,high					//high=128M, low=256M
d) crashkernel=512M,low						//high=0G, low=0M, invalid
e) crashkernel=512M,high crashkernel=0,low			//high=512M, low=0M
f) crashkernel=4G,high crashkernel=ab,low			//high=0G, low=0M, invalid
@bobolmw
Copy link
Collaborator

bobolmw commented Apr 19, 2022

Test result based on latest linus master branch in ampere platform:

  1. without patch: cannot allocate memory
  2. with option 'crashkernel=4G', kdump works, 256MB low memory reserverd, dump file generated
  3. with option 'crashkernel=4G crashkernel=512MB,low', kdump works, 256MB low memory reserverd, dump file generated

@adamliyi
Copy link
Collaborator Author

adamliyi commented Apr 21, 2022

Updated on 05/05/2022: patch backported to 5.15 Longterm kernel: #165

@adamliyi
Copy link
Collaborator Author

adamliyi commented May 5, 2022

https://lore.kernel.org/linux-arm-kernel/[email protected]/
V22 of the patch has been posted on 2022-04-14, will keep testing and tracking.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants