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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 750AFC4332F for ; Wed, 4 Jan 2023 09:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WXXTZP0ejn/xeklfQgArf3scsx6yiXGln8xdaxbgUsw=; b=Q+I3LhoUxQn15/ aT17vOs8zXwgw3ovNMPeJA9TYYIMuAURmvk5fPu671uYc4WcTu+KwuCoVWhmTbcbvo3HFeqDrOEQV xdG2MiuW0u7oe8/nQnK9Iy1pTif9DryIXM8SeZFkOdcERq8YvKN7TYckGh4N7pxcXD64/xs41Y4pe MGzQgi5spSZRULkLIN3MikGVsH7ZsM/aMCGt4b/rXXYPpbeEAwZe3PMKm6Rg8aZdwZ9N1YbRkIaQA vFlcmiJexKcbaGSEWycVTYvuveloXPJdMItVcBFqkLw9YeA/L0m1/qzXIQ7dauwZVB8Y2ChwqXhxn iTEuXK2D/KvTDVQ2AMVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCztW-007yPA-HN; Wed, 04 Jan 2023 09:17:10 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCzrA-007xIM-Ai for linux-arm-kernel@lists.infradead.org; Wed, 04 Jan 2023 09:14:45 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A5F08615ED; Wed, 4 Jan 2023 09:14:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E34EC433D2; Wed, 4 Jan 2023 09:14:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672823683; bh=mJh49gOowpFn7+Mf2+NzoeE+1uPAP7nf0ykY5SI6xRA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RByDVmopxsAX67RDoyuA2IWr4HOq9FpatqPtVszFPzZaebwXr8veU4HeQEgrtxf1I Q8uE8wYYZgIAWKjnm8AdHQkkG6bHfGP7z+YnIrOYwjHdiHAroKTiUwRLYkqZJBOF8w AKkmncuAsR8KBxgRCazMKMYiIO8v62KucjLHnMrYSvpSKZWtbdlxDSM+08P4LeymNH a6NoLvBYDb/dfLIAmIwpTkwjMWjtRL9BUKHn0L/JieiRjIhfi7oX3HvB5mqceAvm/B 6omlv6sF2XQc9fPfP4Rd1M7QXguLWpQWZwWvGSPNkne4ZsenZHRgb8SUi0gTdcI5+8 6XonmoREJZLlA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pCzr6-00GiDV-PE; Wed, 04 Jan 2023 09:14:40 +0000 Date: Wed, 04 Jan 2023 09:14:40 +0000 Message-ID: <86sfgq7jb3.wl-maz@kernel.org> From: Marc Zyngier To: Shanker Donthineni Cc: Catalin Marinas , Will Deacon , James Morse , , Subject: Re: [PATCH v2] arm64: gic: increase the number of IRQ descriptors In-Reply-To: <20230104023738.1258925-1-sdonthineni@nvidia.com> References: <20230104023738.1258925-1-sdonthineni@nvidia.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: sdonthineni@nvidia.com, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230104_011444_570270_12CB93F8 X-CRM114-Status: GOOD ( 25.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 04 Jan 2023 02:37:38 +0000, Shanker Donthineni wrote: > > The default value of NR_IRQS is not sufficient to support GICv4.1 > features and ~56K LPIs. This parameter would be too small for certain > server platforms where it has many IO devices and is capable of > direct injection of vSGI and vLPI features. > > Currently, maximum of 64 + 8192 (IRQ_BITMAP_BITS) IRQ descriptors > are allowed. The vCPU creation fails after reaching count ~400 with > kvm-arm.vgic_v4_enable=1. > > This patch increases NR_IRQS to 1^19 to cover 56K LPIs and 262144 > vSGIs (16K vPEs x 16). > > Signed-off-by: Shanker Donthineni > --- > Changes since v1: > -create from v6.2-rc1 and edit commit text > > arch/arm64/include/asm/irq.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/include/asm/irq.h b/arch/arm64/include/asm/irq.h > index fac08e18bcd5..3fffc0b8b704 100644 > --- a/arch/arm64/include/asm/irq.h > +++ b/arch/arm64/include/asm/irq.h > @@ -4,6 +4,10 @@ > > #ifndef __ASSEMBLER__ > > +#if defined(CONFIG_ARM_GIC_V3_ITS) > +#define NR_IRQS (1 << 19) > +#endif > + > #include > > struct pt_regs; Sorry, but I don't think this is an acceptable change. This is a large overhead that affects *everyone*, and that will eventually be too small anyway with larger systems and larger interrupt spaces. A better way to address this would be to move to a more dynamic allocation, converting the irqdesc rb-tree into an xarray, getting rid of the bitmaps (the allocation bitmap and the resend one), and track everything in the xarray. This would scale, avoid allocations, and benefit all architectures. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel