+Philipp and Baoquan,
Could you share any opinion/suggestion about it?
Thanks
On Fri, Feb 10, 2023 at 4:20 PM Pingfan Liu <piliu(a)redhat.com> wrote:
On Fri, Feb 10, 2023 at 4:08 PM Pingfan Liu <piliu(a)redhat.com> wrote:
>
> Here comes the requirement of the 64K aarch64 kernel.
>
> The typical user case is: the anaconda installs the 4K kernel and later,
> if a user needs 64K kernel, he/she need to install it separatedly.
>
> Since the 4K kernel has a different memory reservation from the 64K, the
> new installed 64K kernel can use the recommended value regardless of the
> user defined value for 4K kernel.
>
> Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
> ---
> kdumpctl | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/kdumpctl b/kdumpctl
> index 553c392..e43fab7 100755
> --- a/kdumpctl
> +++ b/kdumpctl
> @@ -1623,6 +1623,7 @@ reset_crashkernel_for_installed_kernel()
> {
> local _installed_kernel _running_kernel _crashkernel _crashkernel_running
> local _dump_mode_running _fadump_val_running
> + local _arch
>
> # During package install, only try to reset crashkernel for osbuild
> # thus to avoid calling grubby when installing os via anaconda
> @@ -1651,6 +1652,29 @@ reset_crashkernel_for_installed_kernel()
> _dump_mode_running=$(get_dump_mode_by_kernel "$_running_kernel")
> _fadump_val_running=$(get_grub_kernel_boot_parameter "$_kernel"
fadump)
>
> + _arch=$(uname -m)
> + # On aarch64, there are 4K and 64K kernel, which demands different
crashkernel value
> + if [[ $_arch == "aarch64" ]]; then
> + local _installed_64K _running_64K
> +
> + _installed_64K=0
> + #echo "$_installed_kernel" | grep 64k
> + if echo "$_installed_kernel" | grep 64k; then
> + _installed_64K=1
> + fi
> + if echo "$_running_kernel" | grep 64k; then
> + _running_64K=1
> + fi
> +
> + # Otherwise, fall through to common case
> + if [[ $_installed_64K != "$_running_64K" ]]; then
> + # if the difference is 4K VS 64K
> + _crashkernel_running=$(kdump_get_arch_recommend_crashkernel
"kdump" "$_installed_kernel")
Here, if the installed kernel is different from the running kernel, it
just uses the default recommended "crashkernel=".
But when discussion with Coiby off-list, he showed his concerns:
-1. whether it is suitable to use the default recommended 64K value if
a user has a user defined value for 4K kernel
-2. if installing a series kernel: 4K_a, 64K_b, 4K_c, and in kernel
'4K_a ', the user has specify his prefered "crashkernel=", and in
64K_b, during the installation of 4K_c kernel, this patch can not
inherit the user preferred value for 4K_a.
(where the naming 4K_a/ 4K_b/ 64K_c means #pagesize_#instance, i.e
three instances a, b and c.)
For the time being, I have no good idea about it. Any suggestions about it?
Thanks,
Pingfan
> + _update_kernel_cmdline "$_installed_kernel"
"$_crashkernel_running" "$_dump_mode_running"
"$_fadump_val_running"
> + return
> + fi
> + fi
> +
> if [[ $_crashkernel != "$_crashkernel_running" ]]; then
> if _update_kernel_cmdline "$_installed_kernel"
"$_crashkernel_running" "$_dump_mode_running"
"$_fadump_val_running"; then
> echo "kexec-tools has reset $_installed_kernel to use
the new default crashkernel value $_crashkernel_running"
> --
> 2.31.1
> _______________________________________________
> 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