From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693AbcGYB4e (ORCPT ); Sun, 24 Jul 2016 21:56:34 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:2205 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398AbcGYB4I (ORCPT ); Sun, 24 Jul 2016 21:56:08 -0400 Message-ID: <579570D5.7060803@huawei.com> Date: Mon, 25 Jul 2016 09:52:21 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Andrew Morton CC: Joonsoo Kim , Vlastimil Babka , Naoya Horiguchi , David Rientjes , Linux MM , LKML Subject: Re: [PATCH v2] mem-hotplug: alloc new page from the next node if zone is MOVABLE_ZONE References: <57918BAC.8000008@huawei.com> <20160722131103.23c02a66d086df8f2ddae601@linux-foundation.org> In-Reply-To: <20160722131103.23c02a66d086df8f2ddae601@linux-foundation.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.579570E1.0055,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 50c4b8b2f865c226d9e9fa5991080656 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/7/23 4:11, Andrew Morton wrote: > On Fri, 22 Jul 2016 10:57:48 +0800 Xishi Qiu wrote: > >> Memory offline could happen on both movable zone and non-movable zone. >> We can offline the whole node if the zone is movable zone, and if the >> zone is non-movable zone, we cannot offline the whole node, because >> some kernel memory can't be migrated. >> >> So if we offline a node with movable zone, use prefer mempolicy to alloc >> new page from the next node instead of the current node or other remote >> nodes, because re-migrate is a waste of time and the distance of the >> remote nodes is often very large. >> >> Also use GFP_HIGHUSER_MOVABLE to alloc new page if the zone is movable >> zone. > > This conflicts pretty significantly with your "mem-hotplug: use > different mempolicy in alloc_migrate_target()". Does it replace > "mem-hotplug: use different mempolicy in alloc_migrate_target()" and > your "mem-hotplug: use GFP_HIGHUSER_MOVABLE in, > alloc_migrate_target()", or what? > Hi Andrew, Yes, this patch is v2, "mem-hotplug: use different mempolicy in alloc_migrate_target()" and "mem-hotplug: use GFP_HIGHUSER_MOVABLE in alloc_migrate_target()" are v1, so just replace them. Joonsoo and Vlastimil point that migratable pages are not always from user space, so it is not correct to use GFP_HIGHUSER_MOVABLE in alloc_migrate_target(). David points that CMA and memory offline are distinct usecases and probably deserve their own callbacks. Thanks, Xishi Qiu > > . >