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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D91EC433EF for ; Tue, 9 Nov 2021 16:16:53 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55103611CA for ; Tue, 9 Nov 2021 16:16:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 55103611CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HpY5Z633wz3cBq for ; Wed, 10 Nov 2021 03:16:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=csgroup.eu (client-ip=93.17.235.10; helo=pegase2.c-s.fr; envelope-from=christophe.leroy@csgroup.eu; receiver=) Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HpY561dxsz2yK3 for ; Wed, 10 Nov 2021 03:16:25 +1100 (AEDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4HpY5231hlz9sSH; Tue, 9 Nov 2021 17:16:22 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iSolt3Cnnlbv; Tue, 9 Nov 2021 17:16:22 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4HpY522GgQz9sSG; Tue, 9 Nov 2021 17:16:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3C79E8B77A; Tue, 9 Nov 2021 17:16:22 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id Vx5fyIRzu-tL; Tue, 9 Nov 2021 17:16:22 +0100 (CET) Received: from [192.168.233.192] (unknown [192.168.233.192]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0939B8B767; Tue, 9 Nov 2021 17:16:21 +0100 (CET) Message-ID: Date: Tue, 9 Nov 2021 17:16:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2] powerpc/64s: introduce CONFIG_MAXSMP to test very large SMP Content-Language: fr-FR To: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org References: <20211109065131.2041720-1-npiggin@gmail.com> From: Christophe Leroy In-Reply-To: <20211109065131.2041720-1-npiggin@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Le 09/11/2021 à 07:51, Nicholas Piggin a écrit : > Similarly to x86, add MAXSMP that should help flush out problems with > vary large SMP and other values associated with very big systems. > > Signed-off-by: Nicholas Piggin > --- > Since v1: > - Reduce MAXSMP NR_CPUS to 8192 if COMPILE_TEST, to reduce compile errors > that aren't caught by existing x86 builds. > > Thanks, > Nick > > arch/powerpc/Kconfig | 8 ++++++++ > arch/powerpc/platforms/Kconfig.cputype | 9 +++++++-- > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index b8f6185d3998..d585fcfa456f 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -64,6 +64,13 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK > config NEED_PER_CPU_PAGE_FIRST_CHUNK > def_bool y if PPC64 > > +config MAXSMP > + bool "Enable Maximum number of SMP Processors and NUMA Nodes" > + depends on SMP && DEBUG_KERNEL && PPC_BOOK3S_64 > + help > + Enable maximum number of CPUS and NUMA Nodes for this architecture. > + If unsure, say N. > + > config NR_IRQS > int "Number of virtual interrupt numbers" > range 32 1048576 > @@ -666,6 +673,7 @@ config NUMA > > config NODES_SHIFT > int > + default "10" if MAXSMP > default "8" if PPC64 > default "4" > depends on NUMA > diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype > index a208997ade88..14c275e0ff93 100644 > --- a/arch/powerpc/platforms/Kconfig.cputype > +++ b/arch/powerpc/platforms/Kconfig.cputype > @@ -475,9 +475,14 @@ config SMP > > If you don't know what to do here, say N. > > +# MAXSMP sets 8192 if COMPILE_TEST because that's what x86 has flushed out. > +# Exceeding that will cause a lot of compile errors. Have to deal with those > +# first. > config NR_CPUS > - int "Maximum number of CPUs (2-8192)" if SMP > - range 2 8192 if SMP > + int "Maximum number of CPUs (2-8192)" if SMP && !MAXSMP > + range 2 16384 if SMP > + default 16384 if MAXSMP && !COMPILE_TEST > + default 8192 if MAXSMP && COMPILE_TEST You can do less complex. First hit becomes the default, so you can do: default 8192 if MAXSMP && COMPILE_TEST default 16384 if MAXSMP So when everything is fixed, you just have to drop first line. > default "1" if !SMP > default "32" if PPC64 > default "4" >