[PATCH 0/3] memory-hotplug: improve rezoning capability

From: Reza Arbab
Date: Mon May 09 2016 - 13:53:50 EST


While it is currently possible to rezone memory when it is onlined, there are
implicit assumptions about the zones:

* To "online_kernel" a block into ZONE_NORMAL, it must currently
be in ZONE_MOVABLE.

* To "online_movable" a block into ZONE_MOVABLE, it must currently
be in (ZONE_MOVABLE - 1).

So on powerpc, where new memory is hotplugged into ZONE_DMA, these operations
do not work.

This patchset replaces the qualifications above with a more general
validation of zone movement.

Reza Arbab (3):
memory-hotplug: add move_pfn_range()
memory-hotplug: more general validation of zone during online
memory-hotplug: use zone_can_shift() for sysfs valid_zones attribute

drivers/base/memory.c | 28 ++++++++++-------
include/linux/memory_hotplug.h | 2 ++
mm/memory_hotplug.c | 70 ++++++++++++++++++++++++++++++++++--------
3 files changed, 77 insertions(+), 23 deletions(-)

--
1.8.3.1