[-next] memory hotplug regression

From: Heiko Carstens
Date: Wed May 24 2017 - 04:20:48 EST


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.

FWIW, and a bit unrelated: we had/have very basic lsmem and chmem tools
which can be used to list memory states and bring memory online and
offline. These tools were part of the s390-tools package and only recently
moved to util-linux.