From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F6F53C00 for ; Thu, 15 May 2025 07:16:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747293390; cv=none; b=rPLfTp228A5hu79pZX+JvNp+DJ0/tl4dlS6Vj/2PNfeg93oN7SfAA5JufczEkSZ5/HAjksmkyPcs2kWwEfVAvtzm97OWoX5fE3BW5gfA6pYHZiu20FYDvKLm4UiHhaw3kQYagXRbqTlQ0DK1m2+glcz0rcPJMVy9UG22evtJrwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747293390; c=relaxed/simple; bh=aQs1XIPe57K9n8PcMJI8I5+ObKj3gnKRAF2bfZObLpY=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=LQ4MyYm8UAz3fCJuUp6DZd55rn9SGESeO4mc9ZaxIXfYgWKthYVSkkI0dmYdCG6GGL8JJuIC+drBnXFP6DBejSt95nwsHo4Zh9Dk40B4NxmwAhPtYj18puQmMcNvjaqWDEnhjOB5V0dst/uoJfTfeVihKjwmXQTcbSWu65vKe1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GMa2HNp2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GMa2HNp2" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.