Re: [PATCH 1/2] mem-hotplug: use GFP_HIGHUSER_MOVABLE in, alloc_migrate_target()

From: David Rientjes
Date: Tue Jul 19 2016 - 15:05:41 EST


On Tue, 19 Jul 2016, Xishi Qiu wrote:

> Memory offline could happen on both movable zone and non-movable zone, and we
> can offline the whole node if the zone is movable_zone(the node only has one
> movable_zone), and if the zone is normal_zone, we cannot offline the whole node,
> because some kernel memory can't be migrated.
>
> So how about change alloc_migrate_target() to alloc memory from the next node
> with GFP_HIGHUSER_MOVABLE, if the offline zone is movable_zone.
>

I think sharing alloc_migrate_target as a migration callback may not be
worth it; CMA and memory offline are distinct usecases and probably
deserve their own callbacks.