From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FC7EC43331 for ; Thu, 2 Apr 2020 08:01:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5CFE2078B for ; Thu, 2 Apr 2020 08:01:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5CFE2078B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 73B1F8E0009; Thu, 2 Apr 2020 04:01:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 711DA8E0007; Thu, 2 Apr 2020 04:01:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64E978E0009; Thu, 2 Apr 2020 04:01:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4BCB68E0007 for ; Thu, 2 Apr 2020 04:01:48 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1585F2461 for ; Thu, 2 Apr 2020 08:01:48 +0000 (UTC) X-FDA: 76662171096.10.boot96_49e4a33500c3a X-HE-Tag: boot96_49e4a33500c3a X-Filterd-Recvd-Size: 4789 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 08:01:47 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id d77so2347351wmd.3 for ; Thu, 02 Apr 2020 01:01:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UrBSIQuzAujdG2IKZQy1WDw2nZSqWHmIp0pyFUuT55I=; b=C2h0XcfEPQNjYcTX3k8oLCKveEwAMz00E4GBcEz1ivBf1bUZuTcbTWIfxh4Y3WkWg7 ENyK9qJXWdMWjbNyKtGsyo/QN46BoFESdI2Zn7wMgkAS85qvJRCVPNBYgyWw5p/9ccrq k/YRmB2KAIsWkgfzkVrp8tuE+RDjLoM+XrNwQLWeAND/OvQIGT8q/xZaxvgT3cSdjEXr 62PIyXmwdKGF+mpx0BxOvIuTkPh4Sl7fwDtazo0xKHRwBqjsJkiK045hMHvkv8ms32eP SEGWHS1OxeKY87GL0BJD2PG3S9nEMTLPHizh6D1xwUEB9fpp4lJIYWCv19eCvkbXdRTw PqTg== X-Gm-Message-State: AGi0PuYvTL4NxhVbP1FPw1tH10lvIB3dFqTwIVNZ4AaVa91bvu7nCJ76 X8IQHgCrJvTipKeyacUYYGs= X-Google-Smtp-Source: APiQypLKMYqb9qsRd12t2lZK0oNaHQe5op/Ct4om+69/3ikerP3v6RKRd1oyx6YEyyBTpuIaTaPA/w== X-Received: by 2002:a1c:4d16:: with SMTP id o22mr2320220wmh.56.1585814506667; Thu, 02 Apr 2020 01:01:46 -0700 (PDT) Received: from localhost (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id v21sm5906815wmh.26.2020.04.02.01.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 01:01:45 -0700 (PDT) Date: Thu, 2 Apr 2020 10:01:44 +0200 From: Michal Hocko To: Mike Rapoport Cc: Baoquan He , Hoan Tran , Catalin Marinas , Will Deacon , Andrew Morton , Vlastimil Babka , Oscar Salvador , Pavel Tatashin , Alexander Duyck , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "David S. Miller" , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "open list:MEMORY MANAGEMENT" , linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, lho@amperecomputing.com, mmorana@amperecomputing.com Subject: Re: [PATCH RFC] mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP (was: Re: [PATCH v3 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA) Message-ID: <20200402080144.GK22681@dhcp22.suse.cz> References: <1585420282-25630-1-git-send-email-Hoan@os.amperecomputing.com> <20200330074246.GA14243@dhcp22.suse.cz> <20200330092127.GB30942@linux.ibm.com> <20200330095843.GF14243@dhcp22.suse.cz> <20200331215618.GG30942@linux.ibm.com> <20200401054227.GC2129@MiWiFi-R3L-srv> <20200401075155.GH30942@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200401075155.GH30942@linux.ibm.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 01-04-20 10:51:55, Mike Rapoport wrote: > Hi, > > On Wed, Apr 01, 2020 at 01:42:27PM +0800, Baoquan He wrote: [...] > > From above information, we can remove HAVE_MEMBLOCK_NODE_MAP, and > > replace it with CONFIG_NUMA. That sounds more sensible to store nid into > > memblock when NUMA support is enabled. > > Replacing CONFIG_HAVE_MEMBLOCK_NODE_MAP with CONFIG_NUMA will work, but > this will not help cleaning up the whole node/zone initialization mess and > we'll be stuck with two implementations. Yeah, this is far from optimal. > The overhead of enabling HAVE_MEMBLOCK_NODE_MAP is only for init time as > most architectures will anyway discard the entire memblock, so having it in > a UMA arch won't be a problem. The only exception is arm that uses > memblock for pfn_valid(), here we may also think about a solution to > compensate the addition of nid to the memblock structures. Well, we can make memblock_region->nid defined only for CONFIG_NUMA. memblock_get_region_node would then unconditionally return 0 on UMA. Essentially the same way we do NUMA for other MM code. I only see few direct usage of region->nid. -- Michal Hocko SUSE Labs