Re: [-next] memory hotplug regression

From: Michal Hocko
Date: Wed May 24 2017 - 04:40:15 EST


On Wed 24-05-17 10:20:22, Heiko Carstens wrote:
> Hello Michal,
>
> I just re-tested linux-next with respect to your memory hotplug changes and
> actually (finally) figured out that your patch ("mm, memory_hotplug: do not
> associate hotadded memory to zones until online)" changes behaviour on
> s390:
>
> before your patch memory blocks that were offline and located behind the
> last online memory block were added by default to ZONE_MOVABLE:
>
> # cat /sys/devices/system/memory/memory16/valid_zones
> Movable Normal
>
> With your patch this changes, so that they will be added to ZONE_NORMAL by
> default instead:
>
> # cat /sys/devices/system/memory/memory16/valid_zones
> Normal Movable
>
> Sorry, that I didn't realize this earlier!
>
> Having the ZONE_MOVABLE default was actually the only point why s390's
> arch_add_memory() was rather complex compared to other architectures.
>
> We always had this behaviour, since we always wanted to be able to offline
> memory after it was brought online. Given that back then "online_movable"
> did not exist, the initial s390 memory hotplug support simply added all
> additional memory to ZONE_MOVABLE.
>
> Keeping the default the same would be quite important.

Hmm, that is really unfortunate because I would _really_ like to get rid
of the previous semantic which was really awkward. The whole point of
the rework is to get rid of the nasty zone shifting.

Is it an option to use `online_movable' rather than `online' in your setup?
Btw. my long term plan is to remove the zone range constrains altogether
so you could online each memblock to the type you want. Would that be
sufficient for you in general?

--
Michal Hocko
SUSE Labs