Hi Sourabh,
thanks for the patch. All in all it looks sane to me. There are two
nits/questions I have though.
On Mon, 24 Jul 2023 12:21:19 +0530
Sourabh Jain <sourabhjain(a)linux.ibm.com> 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>
^^^^
1) is this email address correct? I thought the .vnet. addresses were
decommissioned years ago.
2) There are two more places where we read from
/sys/kernel/kexec_crash_size which needs to be fixed (one in
kdumpctl:show_reserved_mem and the other in
kdump-lib.sh:check_crash_mem_reserved). Personally I think it makes
more sense to move the read into a separate function and call that when
in those three locations. This at least prevents the same bug to be
re-introduced in the future.
Thanks
Philipp
---
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