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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 02333C4361B for ; Wed, 16 Dec 2020 02:50:31 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 23D852311D for ; Wed, 16 Dec 2020 02:50:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23D852311D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CwfkX1ckBzDqCh for ; Wed, 16 Dec 2020 13:50:28 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (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 4Cwfht4xgczDqBm for ; Wed, 16 Dec 2020 13:49:02 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=Lks9h17O; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Cwfht3VrWz9sRR; Wed, 16 Dec 2020 13:49:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1608086942; bh=mxqVu9RrcjWhIRq9aGVq7hXZvWKdP4GoOIWTNnE05Cw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Lks9h17Oxy5tXsQ4wlNH2deHB/eGxJQl7ZpvUn4ahy3YhsdkTYgSOos7RmUYQFeN7 rlqSJ1lDNNkIeuYxFIUU0KPaR3XC6v2y26e3c1C/vTPc6F0Y2XoucLmXlR3k5z4+4R n7hdvk0s0WdtzhTiSycNySy+WutzTuvBQR4AMgZySVvz92uPUPqAd00WpCzl+jTfq9 GaBUgc8DqQrYYe+OaOJNy654OyGjpC0+x0hBIkHUePV3VDHoKpFwtDro476VRGZDw5 I5q3QRkGRCJk2qhBho1Y8GHIYwpat2Yzipd1WXQXkBHc0tAWOa+ANKxQy1yqrrpP9H 0yp6m/cxcdzrA== From: Michael Ellerman To: =?utf-8?Q?C=C3=A9dric?= Le Goater , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 07/13] powerpc: Increase NR_IRQS range to support more KVM guests In-Reply-To: <9fca102b-b1b2-84b0-085f-96965f126e58@kaod.org> References: <20201210171450.1933725-1-clg@kaod.org> <20201210171450.1933725-8-clg@kaod.org> <87czzhrzhk.fsf@mpe.ellerman.id.au> <9fca102b-b1b2-84b0-085f-96965f126e58@kaod.org> Date: Wed, 16 Dec 2020 13:49:01 +1100 Message-ID: <87wnxixy76.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Cc: Greg Kurz Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" C=C3=A9dric Le Goater writes: > On 12/11/20 12:51 AM, Michael Ellerman wrote: >> C=C3=A9dric Le Goater writes: >>> PowerNV systems can handle up to 4K guests and 1M interrupt numbers >>> per chip. Increase the range of allowed interrupts to support a larger >>> number of guests. >>> >>> Reviewed-by: Greg Kurz >>> Signed-off-by: C=C3=A9dric Le Goater >>> --- >>> arch/powerpc/Kconfig | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >>> index 5181872f9452..c250fbd430d1 100644 >>> --- a/arch/powerpc/Kconfig >>> +++ b/arch/powerpc/Kconfig >>> @@ -66,7 +66,7 @@ config NEED_PER_CPU_PAGE_FIRST_CHUNK >>>=20=20 >>> config NR_IRQS >>> int "Number of virtual interrupt numbers" >>> - range 32 32768 >>> + range 32 1048576 >>> default "512" >>> help >>> This defines the number of virtual interrupt numbers the kernel >>=20 >> We should really do what other arches do, and size this appropriately >> based on the config, rather than asking users to guess what size they >> need. >>=20 >> But I guess I'll take this for now, and we can do something fancier >> later. > > I was thinking on adding a property to OPAL to size the HW interrupt=20 > number space. Is that it ? That's a separate issue. NR_IRQS is about the maximum number of Linux interrupts, and it's a compile time limit. In the old days there was an array of irq_desc[NR_IRQS] in .data, so you didn't want NR_IRQS to be too big. These days we don't do that, because of the sparse IRQ support, but I don't know if it's completely free to make NR_IRQS arbitrarily large at build time. > That would be good because it's increasing from 20bits on P9 to 24bits > on P10. That's probably still helpful, it might mean we can shrink some structures at runtime. > I am checking other arches. Thanks. cheers