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 EA704C54755 for ; Thu, 15 May 2025 07:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3aeK+AO9IGTgcg8xUpQl4U4aOkethyY3zUMzf+njkN8=; b=j7cgHj5ZOAwx02suJUd7UBE1P8 YRxhl90m81cfMep0MDM9Rk1LbJmJj14oDVeBaTFBjPqTgoklsYv+1Nr25S9OJUIKNBqPnrmp4PVeb ufD1/08dzrW9DMib+XXt+i4ZjcEv+pojGM7hAzWHEq4LQ055XADRsjuBjV+bsM2cTuNdohdsjkDYJ S/BzVFk+S+hNnKbP+sEZCSaINOJeMiiK6h/+5Kv+d0p16uPKEonhpOboaYqMKSD2YOjDqH7Re7uVC 4IewHGgSakdu4xu4klWxtNCaBcepW5WITuVRm6t0OSiCbNfbfN4JHDxPCenMtZ5jZiU3vg2ZTpVzB w7mKwhmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uFSrU-0000000HFIS-1Q12; Thu, 15 May 2025 07:18:36 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uFSpS-0000000HF3J-1sji for linux-arm-kernel@lists.infradead.org; Thu, 15 May 2025 07:16:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id A3DB649ED7; Thu, 15 May 2025 07:16:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D4BFC4CEE7; Thu, 15 May 2025 07:16:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747293389; bh=aQs1XIPe57K9n8PcMJI8I5+ObKj3gnKRAF2bfZObLpY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GMa2HNp2Mgab22TOka+1Jupo3bWlm2IbBn+6CDBEcVxYY+K59YG7c9Ra3A9kAmFBn wYeTRilRpL5t5BDrdBjfjrDrg1qLkgppIVX+axllp21JBCij7OZ+Trjv5OhzRjOgL6 FTStY8REPS6cUtFmQz5nHLBI67gCVPhahyes3VJz5/L70EglTJ4lSMdFvX0Gy88mMj N1vxY3sH+f6d2L6ntuMZpRP5HokwnzWwZ3btoMgI286p8AE8/sXecYZy4H+D1EH/wg nOWSYq1OFTgl9F8Dt5h9uit5SdhumrtRrPOggneXGwk4P8Pu02KK8HjmWSgLUAIAgB aG24WVsnKUH/w== 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 1uFSpO-00F7vF-5l; Thu, 15 May 2025 08:16:26 +0100 Date: Thu, 15 May 2025 08:16:25 +0100 Message-ID: <86ldqyfinq.wl-maz@kernel.org> From: Marc Zyngier To: Nianyao Tang Cc: , , , , , Subject: Re: [PATCH v3] irqchip/gic-v4.1: Use local 4_1 ITS to generate VSGI In-Reply-To: <20250515145359.2795959-1-tangnianyao@huawei.com> References: <20250515145359.2795959-1-tangnianyao@huawei.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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tangnianyao@huawei.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, guoyang2@huawei.com, wangwudi@hisilicon.com, wangzhou1@hisilicon.com 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-20250515_001630_510385_C12139EB X-CRM114-Status: GOOD ( 17.30 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 15 May 2025 15:53:59 +0100, Nianyao Tang wrote: > > On multi-node GICv4.1 system, VSGI senders always use one certain 4_1 ITS, > because find_4_1_its return the first its_node in list, regardless of > which node the VSGI sender is on. This brings guest vsgi performance drop > when VM is not running on the same node as this returned ITS. > > On a 2-socket environment, each with one ITS and 32 cpu, GICv4.1 enabled, > 4U8G guest, 4 vcpu is running on same socket. > When VM on socket0, kvm-unit-tests ipi_hw result is 850ns. > When VM on socket1, it is 750ns. The reason is VSGI sender always > use the last reported ITS(that on socket1) to inject VSGI. The access > from cpu to other-socket ITS will cost 100ns more compared to cpu to > local ITS. > > By using a local ITS, we can get 12% reduction in IPI latency. > > Modify find_4_1_its to first return per-cpu local_4_1_its, which is > init when inherit the VPE table from the ITS or from another CPU. > If fail to find local 4_1 ITS, return any 4_1 ITS like before. > > Signed-off-by: Nianyao Tang > Suggested-by: Marc Zyngier Link: https://lore.kernel.org/all/87tthgrt7s.wl-maz@kernel.org Reviewed-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.