[PATCH v12 7/7] x86/crash: Add x86 crash hotplug support

Eric DeVolder eric.devolder at oracle.com
Wed Oct 12 09:20:59 PDT 2022



On 9/30/22 12:40, Borislav Petkov wrote:
> On Fri, Sep 30, 2022 at 12:11:26PM -0500, Eric DeVolder wrote:
>> There is of course a way to enumerate the memory regions in use on the
>> machine, that is not what this code needs. In order to compute the maximum
>> buffer size needed (this buffer size is computed once), the count of the
>> maximum number of memory regions possible (even if not currently in use) is
>> what is needed.
> 
> Isn't that max number documented somewhere in memory hotplug docs?
> 
> Because then you don't need that Kconfig item either. Imagine you're a
> distro kernel distributor and you want crash to work on all machines
> your kernel works.
> 
> So you go and set that number to max. And that would be the 99% of the
> kernel configs out there.
> 
> Which means, you can just set it to max without a Kconfig item.
> 
>> Oh, that would be an error of haste on my part. This should be:
>>    depends on CRASH_DUMP && MEMORY_HOTPLUG
> 
> You need a Kconfig item which enables all this gunk as MEMORY_HOTPLUG is
> not a omnipresent feature. And that Kconfig item should depend on the
> other Kconfig items of the technology you need.

I once had CONFIG_CRASH_HOTPLUG, but you disagreed.

https://lore.kernel.org/lkml/Ylgot+LUDQl+G%2F5N@zn.tnic/

 From there I simply went with

  #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_MEMORY_HOTPLUG)

which route do you prefer?

Thanks!
eric

> 
>> Baoquan pointed me to:
>>
>> https://lore.kernel.org/lkml/cover.1656659357.git.naveen.n.rao@linux.vnet.ibm.com/T/
> 
> In that thread says:
> 
> "- arch_kexec_apply_relocations_add() is only overridden by x86 and s390.
>    Retain the function prototype for those and move the weak
>    implementation into the header as a static inline for other
>    architectures."
> 
> So yes, that's even better.
> 



More information about the kexec mailing list