Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752105AbdFODN7 (ORCPT ); Wed, 14 Jun 2017 23:13:59 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33207 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752051AbdFODN6 (ORCPT ); Wed, 14 Jun 2017 23:13:58 -0400 Date: Thu, 15 Jun 2017 11:13:54 +0800 From: Wei Yang To: Michal Hocko Cc: Wei Yang , Andrew Morton , linux-mm@kvack.org, Mel Gorman , Vlastimil Babka , Andrea Arcangeli , Reza Arbab , Yasuaki Ishimatsu , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML Subject: Re: [PATCH] mm, memory_hotplug: support movable_node for hotplugable nodes Message-ID: <20170615031354.GC16833@WeideMacBook-Pro.local> Reply-To: Wei Yang References: <20170608122318.31598-1-mhocko@kernel.org> <20170612042832.GA7429@WeideMBP.lan> <20170612064502.GD4145@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="m51xatjYGsM+13rf" Content-Disposition: inline In-Reply-To: <20170612064502.GD4145@dhcp22.suse.cz> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2756 Lines: 77 --m51xatjYGsM+13rf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 12, 2017 at 08:45:02AM +0200, Michal Hocko wrote: >On Mon 12-06-17 12:28:32, Wei Yang wrote: >> On Thu, Jun 08, 2017 at 02:23:18PM +0200, Michal Hocko wrote: >> >From: Michal Hocko >> > >> >movable_node kernel parameter allows to make hotplugable NUMA >> >nodes to put all the hotplugable memory into movable zone which >> >allows more or less reliable memory hotremove. At least this >> >is the case for the NUMA nodes present during the boot (see >> >find_zone_movable_pfns_for_nodes). >> > >>=20 >> When movable_node is enabled, we would have overlapped zones, right? > >It won't based on this patch. See movable_pfn_range > Ok, I went through the code and here maybe a question not that close related to this patch. I did some experiment with qemu+kvm and see this. Guest config: 8G RAM, 2 nodes with 4G on each Guest kernel: 4.11 Guest kernel command: kernelcore=3D1G The log message in kernel is: [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] [ 0.000000] Normal [mem 0x0000000100000000-0x000000023fffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Node 0: 0x0000000100000000 [ 0.000000] Node 1: 0x0000000140000000 We see on node 2, ZONE_NORMAL overlap with ZONE_MOVABLE.=20 [0x0000000140000000 - 0x000000023fffffff] belongs to both ZONE. My confusion is: After we enable ZONE_MOVABLE, no matter whether it is enabled by "movable_node" or "kernelcore", we would face this kind of overlap?=20 Finally, the pages in the overlapped range be belongs to which ZONE? --=20 Wei Yang Help you, Help me --m51xatjYGsM+13rf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZQftyAAoJEKcLNpZP5cTdOLEP/2fxKHoMvYc3MtgnpnwRNYvB Yybf0HCp4bcGqjKk/vB+TKTt38UtRULjXw01OHBH0n8J9mfOVKkw/akeWsMWkCKR fNWtE5euTS69+ZPPUiuaAJUznCJkQjUg7MzGRdfmmfArTV7QSYKw3R64MenhHDuc /7o+pw4OPM7yZ+c8OqrGPaAzlakDSgZd1JgThrBc6SW5MyZeTU2abrH15GkjQZef AdVsf6j7vxv/UD0XrwSZzDLOxti1mvvkNhb+N7ZWB095yw0IKHLi8rSOhRi3lprl VGFlSb/zjvUNYh9C7Em3BwfxLaiVh6sPqu06gMx0qBWsRrpsUyQ7UH0MfmeLcR8/ OYMEUlUlLerYzGx5uaWefL0BengUte5vcQB4ABwh0XnQwZsml3o7d4JiNnkN7REh maqK4M6eYatEC8HMs+cI4lJklR8rji0jvsyXAVnnqyZtnQS5+uesQrw0MiilYdzd 3z2PtIQ7kUCXB+Eet/iYcWrJJgsu54vyBSSc0KSS4SPuOi59r3raxBaUUamCIEn8 ohe6rWtVd4ajuQGjFUMOH8MZTW2grLxvZVKbI5rCbJaCQa2YWarY6WPcgicvPANM wQW4eFSE2RnLcqia1Qlbrix9VXKkYyFDiMZsczPenxnehNOT4pl/YcmAsgSS8h+7 cbM/z3uFulZs/cBZQtuz =sp+C -----END PGP SIGNATURE----- --m51xatjYGsM+13rf--