From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935607AbeEIU4O (ORCPT ); Wed, 9 May 2018 16:56:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:38069 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935200AbeEIU4M (ORCPT ); Wed, 9 May 2018 16:56:12 -0400 Date: Wed, 9 May 2018 22:56:09 +0200 From: Michal Hocko To: Huaisheng HS1 Ye Cc: Randy Dunlap , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "willy@infradead.org" , "vbabka@suse.cz" , "mgorman@techsingularity.net" , "pasha.tatashin@oracle.com" , "alexander.levin@verizon.com" , "hannes@cmpxchg.org" , "penguin-kernel@I-love.SAKURA.ne.jp" , "colyli@suse.de" , NingTing Cheng , Ocean HY1 He , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" Subject: Re: [External] [RFC PATCH v1 3/6] mm, zone_type: create ZONE_NVM and fill into GFP_ZONE_TABLE Message-ID: <20180509205609.GV32366@dhcp22.suse.cz> References: <1525746628-114136-1-git-send-email-yehs1@lenovo.com> <1525746628-114136-4-git-send-email-yehs1@lenovo.com> <20180509114712.GP32366@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 09-05-18 14:04:21, Huaisheng HS1 Ye wrote: > > From: owner-linux-mm@kvack.org [mailto:owner-linux-mm@kvack.org] On Behalf Of Michal Hocko > > > > On Wed 09-05-18 04:22:10, Huaisheng HS1 Ye wrote: [...] > > > Current mm treats all memory regions equally, it divides zones just by size, like > > 16M for DMA, 4G for DMA32, and others above for Normal. > > > The spanned range of all zones couldn't be overlapped. > > > > No, this is not correct. Zones can overlap. > > Hi Michal, > > Thanks for pointing it out. > But function zone_sizes_init decides > arch_zone_lowest/highest_possible_pfn's size by max_low_pfn, then > free_area_init_nodes/node are responsible for calculating the spanned > size of zones from memblock memory regions. So, ZONE_DMA and > ZONE_DMA32 and ZONE_NORMAL have separate address scope. How can they > be overlapped with each other? Sorry, I could have been a bit more specific. DMA, DMA32 and Normal zones are exclusive. They are mapped to a specific physical range of memory so they cannot overlap. I was referring to a general property that zones might interleave. Especially zone Normal, Movable and Device. -- Michal Hocko SUSE Labs