From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751791AbcGSTFi (ORCPT ); Tue, 19 Jul 2016 15:05:38 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:34563 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751450AbcGSTFf (ORCPT ); Tue, 19 Jul 2016 15:05:35 -0400 Date: Tue, 19 Jul 2016 12:05:13 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Xishi Qiu cc: Joonsoo Kim , Vlastimil Babka , Andrew Morton , Naoya Horiguchi , Linux MM , LKML Subject: Re: [PATCH 1/2] mem-hotplug: use GFP_HIGHUSER_MOVABLE in, alloc_migrate_target() In-Reply-To: <578DD44F.3040507@huawei.com> Message-ID: References: <57884EAA.9030603@huawei.com> <20160718055150.GF9460@js1304-P5Q-DELUXE> <578C8C8A.8000007@huawei.com> <7ce4a7ac-07aa-6a81-48c2-91c4a9355778@suse.cz> <578C93CF.50509@huawei.com> <20160719065042.GC17479@js1304-P5Q-DELUXE> <578DD44F.3040507@huawei.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.