I recently organized the outstanding work Kairui had done previously on reboot
estimate support[1].
This series add an more accurate kdump crashkernel estimation helper.
Compared to Kairui's version, I only modified parts of the code to adapt to the
new changes in kexec-tools over the last two years. The core part written by
Kairui has only been slightly modified by me.
The original Patch4 has been removed.
In Patch3 v2, I moved most of the code used only in estimate to
kdump-estimate.sh. I exported some variables defined in kdumpctl in order to
use them in estimate.
In Patch4 v2, I found that creating files by using cat or echo and redirecting
output would be blocked by selinux, so I switched to the cp command.
The current version is not perfect, and has only been tested on x86_64-fedora.
It even includes some known issues:
When a large amount of memory is reserved, if crash_base is greater than 4G, it
will reserve 256M of low memory, which causes problems when calculating
reserved_size. This is because we subtract the memtotal given in memdebug from
the set crashkernel value. However, the extra reserved 256M memory causes
memtotal to be greater than crashkernel.
I'm now posting this patchset for everyone to help review and provide feedback.
Thanks.
[1]
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.o...
Kairui Song & Lichen Liu (5):
kdumpctl: only acquire the single instance lock when necessary
kdumpctl: allow passing in extra cmdline using env variable
kdump-estiamte.sh: introduce a seperate file
kdump-estimate.sh: add reboot estimation support
Upate crashkernel-howto.txt
.editorconfig | 2 +-
crashkernel-howto.txt | 100 ++++-
dracut-kdump.sh | 15 +
kdump-estimate-cleanup.service | 8 +
kdump-estimate.service | 11 +
kdump-estimate.sh | 776 +++++++++++++++++++++++++++++++++
kdump-lib.sh | 9 +-
kdump.shutdown | 13 +
kdumpctl | 213 ++-------
kexec-tools.spec | 19 +
10 files changed, 956 insertions(+), 210 deletions(-)
create mode 100644 kdump-estimate-cleanup.service
create mode 100644 kdump-estimate.service
create mode 100755 kdump-estimate.sh
create mode 100644 kdump.shutdown
--
2.40.1