Received: by 10.192.165.148 with SMTP id m20csp5413777imm; Wed, 9 May 2018 04:49:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpA17foXDzy2gYZKEpA7jKkAOlWr3DcEbmsd2M+cuook0qdQM+EBTnRqTM+r400UsjoWQwt X-Received: by 2002:a63:7208:: with SMTP id n8-v6mr33371288pgc.420.1525866558764; Wed, 09 May 2018 04:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525866558; cv=none; d=google.com; s=arc-20160816; b=Ar3GaNQ2+8hvFjKrMY8M4oR5OyWTeijc41A85KNTtTNw/HtkOUH2ttnNDBRwYJy4gk V6S2wNJvXXvYr3MpBU06S1VmWUXLIsm0u/iO/N2jDnLLs2Ch7/nJsEcPZKhGUB1FfQwo 7o5CpJyenRq39GcRA2W5uKx1b1sdl4WFF4fwFDP0O/QN+BLr6FuqICV6AY4JhDWHEcfR LAVxiWpoOn8EWDQ4wsEswri02q3UcaE63zDcYq18nw33CS9sfRLIILu8+KTFN2arX7nf Nl/pBHtGnu1Y4dtvJUw1uT4e9yIeLehxKnDEc9MmtU7sXURnab6BOMvNXfXolE02oZNG 3i6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=YT9ADA/6EjCyq81e+w4giOldrYGwOQNiAYVT+gW3hdI=; b=caS5qCLYT6d+j+qzFhYKBTneiLKj1IqGaSPUvO+hXcylmTtGJV/xfV6ND8z52hOk9c /QvFsOqbhEvt/QoMYftIOy8SLK6PIXEhYdF+hMihBKSLrNuMAkXGRmwZFpcMI98+ThEJ 8wlCdvIGPpE3Sx97/KoZKiKFRzrID/dB+rjLDNiVGFkwZurIN05idfc3SzS7Qw3oZMIn lEhZHLvyYmXsjWdPXNg7nclukCA2/mZeDSUABRv009wyPzqDNgAJTK8kWmJb0mDJ9ryl XA73KWaJ0bh/tAG2kCdM98CeCH2LU2CLOTVtArTaWKeIybwm6LOMcqEbvc53Nd2+30Zr Cz7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n25-v6si1372108pgc.42.2018.05.09.04.49.04; Wed, 09 May 2018 04:49:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934854AbeEILrT (ORCPT + 99 others); Wed, 9 May 2018 07:47:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:48887 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934758AbeEILrQ (ORCPT ); Wed, 9 May 2018 07:47:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EA409ADA2; Wed, 9 May 2018 11:47:13 +0000 (UTC) Date: Wed, 9 May 2018 13:47:12 +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: <20180509114712.GP32366@dhcp22.suse.cz> References: <1525746628-114136-1-git-send-email-yehs1@lenovo.com> <1525746628-114136-4-git-send-email-yehs1@lenovo.com> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 09-05-18 04:22:10, Huaisheng HS1 Ye wrote: > > > On 05/07/2018 07:33 PM, Huaisheng HS1 Ye wrote: > > > diff --git a/mm/Kconfig b/mm/Kconfig > > > index c782e8f..5fe1f63 100644 > > > --- a/mm/Kconfig > > > +++ b/mm/Kconfig > > > @@ -687,6 +687,22 @@ config ZONE_DEVICE > > > > > > +config ZONE_NVM > > > + bool "Manage NVDIMM (pmem) by memory management (EXPERIMENTAL)" > > > + depends on NUMA && X86_64 > > > > Hi, > > I'm curious why this depends on NUMA. Couldn't it be useful in non-NUMA > > (i.e., UMA) configs? > > > I wrote these patches with two sockets testing platform, and there are two DDRs and two NVDIMMs have been installed to it. > So, for every socket it has one DDR and one NVDIMM with it. Here is memory region from memblock, you can get its distribution. > > 435 [ 0.000000] Zone ranges: > 436 [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] > 437 [ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] > 438 [ 0.000000] Normal [mem 0x0000000100000000-0x00000046bfffffff] > 439 [ 0.000000] NVM [mem 0x0000000440000000-0x00000046bfffffff] > 440 [ 0.000000] Device empty > 441 [ 0.000000] Movable zone start for each node > 442 [ 0.000000] Early memory node ranges > 443 [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009ffff] > 444 [ 0.000000] node 0: [mem 0x0000000000100000-0x00000000a69c2fff] > 445 [ 0.000000] node 0: [mem 0x00000000a7654000-0x00000000a85eefff] > 446 [ 0.000000] node 0: [mem 0x00000000ab399000-0x00000000af3f6fff] > 447 [ 0.000000] node 0: [mem 0x00000000af429000-0x00000000af7fffff] > 448 [ 0.000000] node 0: [mem 0x0000000100000000-0x000000043fffffff] Normal 0 > 449 [ 0.000000] node 0: [mem 0x0000000440000000-0x000000237fffffff] NVDIMM 0 > 450 [ 0.000000] node 1: [mem 0x0000002380000000-0x000000277fffffff] Normal 1 > 451 [ 0.000000] node 1: [mem 0x0000002780000000-0x00000046bfffffff] NVDIMM 1 > > If we disable NUMA, there is a result as Normal an NVDIMM zones will be overlapping with each other. > 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. -- Michal Hocko SUSE Labs