Hi Coiby,
On Wed, Feb 15, 2023 at 3:31 PM Coiby Xu <coxu(a)redhat.com> wrote:
Hi Philipp and Pingfan,
On Tue, Feb 14, 2023 at 04:16:25PM +0100, Philipp Rudo wrote:
>Hi Pingfan,
>Hi Coiby,
>
>
>On Fri, 10 Feb 2023 16:20:27 +0800
>Pingfan Liu <piliu(a)redhat.com> wrote:
>
>[...]
>
>> 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?
>
>That's a valid point...
>
>The way I see it we need to find a way to (1) split the problem into
>smaller, easier digestible chunks and (2) define a way the user tells
>us to manage the crashkernel value and thus allows us to ignore any
>changes made manually.
>
>The idea I'm having is that we split the crashkernel default value and
>the update routines from the main kexec-tools into a separate package.
>Ideally we even find a way to define different versions of that package
>that depend on a specific kernel version/variant. When a user installs
>this package he/she also agrees that we are managing the crashkernel
>parameter and allows us to overwrite any changes made by the user.
>
>The idea is still pretty vague, but I think it is worth thinking about
>if splitting up the kexec-tools package can help simplifying the
>problem.
Thanks for sharing your idea!
We only use default crashkernel for new kernel or update default
crashkernel for existing kernels when
1) auto_reset_crashkernel=yes
2) current running kernel use default crashkernel or the-be-updated
kernel use old default crashkernel
One big complexity is to address the 2nd condition. Considering we
have different default crashkernel values for different kernels on the
same system for the cases of kdump/fadump and 4k/64k kernels, I'd like
to propose to write the default crashkernel value to
/var/lib/kdump/crashkernel/KERNEL_NVR for each kernel that uses default
crashkernel so
a) when we need to update the default crashkernel value for existing
kernels, we read its /var/lib/kdump/crashkernel/KERNEL_NVR and compare
it with the value it's using now
b) when we need to set up the crashkernel parameter for newly-installed
kernel, we read /var/lib/kdump/crashkernel/KERNEL_NVR of default kernel
(grubby --info=DEFAULT) and compare the value with the value that the
default kernel is using now
I prefer this direction.
But what about the user defined value? Currently "/etc/kernel/cmdline"
can only hold a valid user defined value for a kernel variant. Hence I
think besides the default value for different kernel variants, we also
need two places to hold different user defined values. Unfortunately,
this is beyond the scope of kexec-tools? Or kexec-tools can introduce
another file "/etc/kernel/cmdline.64K", and add comments at the head
of "/etc/kernel/cmdline" to remind the user.
Thanks,
Pingfan