Re: [PATCH v19 2/7] crash: add generic infrastructure for crash hotplug support

From: Baoquan He
Date: Tue Mar 14 2023 - 10:25:08 EST


On 03/14/23 at 08:28am, Eric DeVolder wrote:
......
> > > +static int crash_memhp_notifier(struct notifier_block *nb, unsigned long val, void *v)
> > > +{
> > > + switch (val) {
> > > + case MEM_ONLINE:
> > > + crash_handle_hotplug_event(KEXEC_CRASH_HP_ADD_MEMORY,
> > > + KEXEC_CRASH_HP_INVALID_CPU);
> > > + break;
> > > +
> > > + case MEM_OFFLINE:
> > > + crash_handle_hotplug_event(KEXEC_CRASH_HP_REMOVE_MEMORY,
> > > + KEXEC_CRASH_HP_INVALID_CPU);
> > > + break;
> > > + }
> > > + return NOTIFY_OK;
> > > +}
> > > +
> > > +static struct notifier_block crash_memhp_nb = {
> > > + .notifier_call = crash_memhp_notifier,
> > > + .priority = 0
> > > +};
> > > +
> >
> > Because for_each_possible_cpu() is taken in
> > crash_prepare_elf64_headers(), x86 doesn't need to respond to cpu
> > hotplug or doesn't do anything with this patchset. This cpu part in
> > infrastructure is only for the later powerpc usage, right?
>
> That is true, yes.

Given this patchset is aimed at crash hotplug on x86, while obviously it
does't need to have the cpu hotplug support on x86 since the
for_each_possible_cpu() adjustment. People looking into this may be
confused if they don't follow the discussion thread of v18. Do we need
to mention this in cover letter or somewhere else? I could miss that
though it is has been told, please ignore this if yes.