Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp724155pxa; Fri, 14 Aug 2020 16:41:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytmwkhQ1oT9FGKxGWcBjwVjfOr6/3XAoBMlxY1SxuZr9b8dCZPUpK4WO2UVWxUoYmlrED+ X-Received: by 2002:a17:906:c18d:: with SMTP id g13mr4619790ejz.239.1597448482897; Fri, 14 Aug 2020 16:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597448482; cv=none; d=google.com; s=arc-20160816; b=heFKIoNFPCLylcNR3CJ43Hs3PcMxmF/rBqs3WgKQUZ+tCjkYHMZDJ0dv5CohQO4YvQ xJA5jPHN7uy8dJNXN5SUcjNVMOZkMDZ2ybVD+KLLV6HfGSNPPNo1WBewDKl9qZ07rd8T oUzeu8fS8cCqPFD9A/ZeHL5/mcNXFXiPxeHFjgPK4SccWaaJ13AqLthtRsIxRBEh0Olc uyMHemu5V2zccSQ7t8ZhZtpboo4X3KA3Zplbuqe/tbrNhcLHabUlMlprwdhvPc9fX5CN n1UQ7OGIy4QnVxTdNlH2Tx0BwpyZi73RMvzvAB6DT2QURxEQxh6bpw6N4TGOeJoUzF2S geDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gcuzMKy5ca6nfpuGB7Mj7FbeflYqFCzDME2EUzPv4RI=; b=lDO6V53v8tYrZU/xx4rPdblEwG45advavPpTpi+83i6mZsnJnrmOtvktn39XkQKlPE kvfZ5jr58yBfHcfIDs2cGIRN8QblvKk16oFTHHlv9kC2OyyGrHp/sZhFA4Dy3hiU8yI8 pWU04aPmjkwzZJTwa74WI1GE3Or7+lb0PTEUBylDnqFPrUF8UGlMvcQrwQ0UxeYeB31n JU/3iBtrzjOoFGOdZEKEdOVJ8HH45/AMIrrE4oOVYxmyQsmVDEJLwybbXDmPzJ3m/MOP C1E1sZ80DEdEfIKAzHteCM6pHpg9vi/YsYpImARhyWM4QcgbSzhCgCsKnm2vQL3Iisyc SuQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=fAOOWOgb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id li13si6257287ejb.423.2020.08.14.16.41.00; Fri, 14 Aug 2020 16:41:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=fAOOWOgb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728129AbgHNXWB (ORCPT + 99 others); Fri, 14 Aug 2020 19:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbgHNXWB (ORCPT ); Fri, 14 Aug 2020 19:22:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40E9AC061385; Fri, 14 Aug 2020 16:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=gcuzMKy5ca6nfpuGB7Mj7FbeflYqFCzDME2EUzPv4RI=; b=fAOOWOgbBBcaQyop3AF67ybOEX k/WF+pgpKGKLLKzbe7Ulx6Ps2XQvg8KHEStyZjDY9NPvQupoQrFENxvNiHJrEXtnvlGDDUcxy1Hyj XQLxy2PVel5XjaOyffpPuWnLysmtajdns/y4kJge3K1NOqDyk0EmYxCucuH0KGwYOq93fSKGR2n3r hSFZ36NXhNa4O7937jfUb3hG0bXZkcE2na7NvzfjDoV9YDkKDgrif4pPhgnyTq8LvLvE7ANflQpbA taeK74i9uBbRoIqgS7v6qkVtUqX9qrXlOIoFxcn/S+q8EUPAi1jZ4EhqobOVsVaOKHKzUHG4/pn35 1748qU+Q==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6j19-0003gu-0n; Fri, 14 Aug 2020 23:21:53 +0000 Subject: Re: [RFC/RFT PATCH 6/6] riscv: Add numa support for riscv64 platform To: Atish Patra , linux-kernel@vger.kernel.org Cc: Greentime Hu , Albert Ou , Andrew Morton , Anshuman Khandual , Anup Patel , Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, Lorenzo Pieralisi , Mike Rapoport , Nick Hu , Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Rob Herring , Steven Price , Will Deacon , Zong Li , Ganapatrao Kulkarni , linux-arm-kernel@lists.infradead.org References: <20200814214725.28818-1-atish.patra@wdc.com> <20200814214725.28818-7-atish.patra@wdc.com> From: Randy Dunlap Message-ID: <0d5046a4-8b7e-6279-ccd2-e02b2a091139@infradead.org> Date: Fri, 14 Aug 2020 16:21:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200814214725.28818-7-atish.patra@wdc.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/14/20 2:47 PM, Atish Patra wrote: > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 7b5905529146..4bd67f94aaac 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -137,7 +137,7 @@ config PAGE_OFFSET > default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB > > config ARCH_FLATMEM_ENABLE > - def_bool y > + def_bool !NUMA > > config ARCH_SPARSEMEM_ENABLE > def_bool y > @@ -295,6 +295,35 @@ config TUNE_GENERIC > > endchoice > > +# Common NUMA Features > +config NUMA > + bool "Numa Memory Allocation and Scheduler Support" NUMA > + select GENERIC_ARCH_NUMA > + select OF_NUMA > + select ARCH_SUPPORTS_NUMA_BALANCING > + help > + Enable NUMA (Non-Uniform Memory Access) support. > + > + The kernel will try to allocate memory used by a CPU on the > + local memory of the CPU and add some more NUMA awareness to the kernel. > + > +config NODES_SHIFT > + int "Maximum NUMA Nodes (as a power of 2)" > + range 1 10 > + default "2" > + depends on NEED_MULTIPLE_NODES > + help > + Specify the maximum number of NUMA Nodes available on the target > + system. Increases memory reserved to accommodate various tables. > + > +config USE_PERCPU_NUMA_NODE_ID > + def_bool y > + depends on NUMA > + > +config NEED_PER_CPU_EMBED_FIRST_CHUNK > + def_bool y > + depends on NUMA > + > config RISCV_ISA_C > bool "Emit compressed instructions when building Linux" > default y thanks. -- ~Randy