Re: [PATCH 0/2] memory_hotplug: introduce config and command line options to set the default onlining policy

From: David Rientjes
Date: Mon Apr 18 2016 - 17:38:21 EST


On Thu, 7 Apr 2016, Vitaly Kuznetsov wrote:

> >> > This patchset continues the work I started with:
> >> >
> >> > commit 31bc3858ea3ebcc3157b3f5f0e624c5962f5a7a6
> >> > Author: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
> >> > Date: Tue Mar 15 14:56:48 2016 -0700
> >> >
> >> > memory-hotplug: add automatic onlining policy for the newly added memory
> >> >
> >> > Initially I was going to stop there and bring the policy setting logic to
> >> > userspace. I met two issues on this way:
> >> >
> >> > 1) It is possible to have memory hotplugged at boot (e.g. with QEMU). These
> >> > blocks stay offlined if we turn the onlining policy on by userspace.
> >> >
> >> > 2) My attempt to bring this policy setting to systemd failed, systemd
> >> > maintainers suggest to change the default in kernel or ... to use tmpfiles.d
> >> > to alter the policy (which looks like a hack to me):
> >> > https://github.com/systemd/systemd/pull/2938
> >>
> >> That discussion really didn't come to a conclusion and I don't
> >> understand why you consider Lennert's "recommended way" to be a hack?
> >>
> >> > Here I suggest to add a config option to set the default value for the policy
> >> > and a kernel command line parameter to make the override.
> >>
> >> But the patchset looks pretty reasonable regardless of the above.
> >>
> >
> > I don't understand why initscripts simply cannot crawl sysfs memory blocks
> > and online them for the same behavior.
>
> Yes, they can. With this patchset I don't bring any new features, it's
> rather a convenience so linux distros can make memory hotplug work
> 'out of the box' without such distro-specific initscripts. Memory
> hotplug is a standard feature of all major virt technologies so I think
> it's pretty reasonable to have an option to make it work 'by default'
> available.
>

I'd personally disagree that we need more and more config options to take
care of something that an initscript can easily do and most distros
already have their own initscripts that this can be added to. I don't see
anything that the config option adds.