Hello,
Pasting the ouput of *kdumpctl estimate* for better understanding
of this patch:
Kernel command-line:
==================
[root@ ~]# cat /proc/cmdline
BOOT_IMAGE=(ieee1275//vdevice/v-scsi@30000071/disk(a)8100000000000000,msdos2)/vmlinuz-5.14.0-333.el9.ppc64le
root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel-root rd.lvm.lv=rhel/swap biosdevname=0
crashkernel=1024M fadump=on
without this patch:
===============
[root]# kdumpctl estimate
kdump: Dump mode is fadump
kdump: Backing up /boot/initramfs-5.14.0-333.el9.ppc64le.img before rebuild.
Reserved crashkernel: 0M
Recommended crashkernel: 768M
Kernel image size: 46M
Kernel modules size: 0M
Initramfs size: 57M
Runtime reservation: 64M
Large modules: <none>
WARNING: Current crashkernel size is lower than recommended size 768M
With this patch:
=============
[root]# kdumpctl estimate
kdump: Dump mode is fadump
Reserved crashkernel: 1024M
Recommended crashkernel: 768M
Kernel image size: 46M
Kernel modules size: 0M
Initramfs size: 57M
Runtime reservation: 64M
Large modules: <none>
The system has reserved 1024M for crash kernel, and kdumpctl estimate
reporting *Reserved crashkernel* correctly with this patch.
Thanks,
Sourabh Jain
On 24/07/23 12:21, Sourabh Jain wrote:
> In fadump mode, the crashkernel reserved area size cannot be
> obtained from /sys/kernel/kexec_crash_size sysfs node.
>
> The do_estimate function has been modified to use
> /sys/kernel/fadump/mem_reserved to get the reserved area size
> for fadump mode.
>
> Signed-off-by: Sourabh Jain <sourabhjain(a)linux.ibm.com>
> Reported-by: Sachin P Bappalige <sachinpb(a)linux.vnet.ibm.com>
> ---
> kdumpctl | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/kdumpctl b/kdumpctl
> index 7e561fd..7580ab0 100755
> --- a/kdumpctl
> +++ b/kdumpctl
> @@ -1270,7 +1270,12 @@ do_estimate()
> # The default pre-reserved crashkernel value
> baseline_size=$((baseline * size_mb))
> # Current reserved crashkernel size
> - reserved_size=$(< /sys/kernel/kexec_crash_size)
> + if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then
> + reserved_size=$(< /sys/kernel/fadump/mem_reserved)
> + else
> + reserved_size=$(< /sys/kernel/kexec_crash_size)
> + fi
> +
> # A pre-estimated value for userspace usage and kernel
> # runtime allocation, 64M should good for most cases
> runtime_size=$((64 * size_mb))
> --
> 2.41.0
> _______________________________________________
> kexec mailing list -- kexec(a)lists.fedoraproject.org
> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
> Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue