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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 035F3C77B7C for ; Sat, 27 May 2023 13:22:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232667AbjE0NWL (ORCPT ); Sat, 27 May 2023 09:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232597AbjE0NWJ (ORCPT ); Sat, 27 May 2023 09:22:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4F5EA6 for ; Sat, 27 May 2023 06:22:05 -0700 (PDT) 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 38A426123A for ; Sat, 27 May 2023 13:22:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B556C433D2; Sat, 27 May 2023 13:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685193724; bh=uCEsVxEXegwR+e8NkgAsr+MTjGwSIA/foy+UY6nYbos=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uEAPd9QN585j1PybF8hgr1TJzKI0MDEqNaGixMJU2qgFmnuesv+nKEyySXTAMcA7o y5+S6Nf1YsHBXe87NN/RAIgYC1XCbY7BzkTUeUqlFSe2bUxmcW+ACMvse7pp7U8OCp WS3zhEUL3tXRTGboBNjdxShJEMKycPYuq6VduWrO5W+DqoQ1bx+UdtTnATanw5BdNL AsbInYUxGuYEfnnvUYMNnc/+GGz+7Rs8BA15UDEO7fnb8lP0Na0guEfUsMGZSMc2tA nZUwbXFUuAzsDzuvxH3+8q5Xw5jknGm4ukxwoRU2DNK+gL07gxI8VOrKhSuV+Po7t9 0JpZLJChs/xmg== 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 1q2tru-000kzt-CR; Sat, 27 May 2023 14:22:02 +0100 Date: Sat, 27 May 2023 14:22:02 +0100 Message-ID: <86leh9di4l.wl-maz@kernel.org> From: Marc Zyngier To: wangwudi Cc: Subject: Re: [Question about gic vmovp cmd] Consider adding VINVALL after VMOVP In-Reply-To: References: <87v8gfo9rg.wl-maz@kernel.org> <7f07c54fb0a4448fbccce0f97cb5e512@hisilicon.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") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: wangwudi@hisilicon.com, 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 May 2023 10:51:50 +0100, wangwudi wrote: >=20 >=20 >=20 > =E5=9C=A8 2023/5/27 16:56, wangwudi =E5=86=99=E9=81=93: > >=20 > >=20 > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Marc Zyngier [mailto:maz@kernel.org]=20 > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B45=E6=9C=8826=E6=97= =A5 15:03 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: wangwudi > > =E6=8A=84=E9=80=81: linux-kernel@vger.kernel.org > > =E4=B8=BB=E9=A2=98: Re: [Question about gic vmovp cmd] Consider adding = VINVALL after VMOVP > >=20 > > On Fri, 26 May 2023 07:04:34 +0100, > > wangwudi wrote: > >> > >> Hi Marc, > >> > >> During vpe migration, VMOVP needs to be executed. > >> If the vpe is migrated for the first time, especially before it is=20 > >> scheduled for the first time, there may be some unusual hanppens over = > >> kexec. > >=20 > > What may happen? >=20 > Actually, I'm not sure. Then what is that all for? >=20 > >=20 > >> We might consider adding a VINVALL cmd after VMOVP to increase=20 > >> robustness. > >=20 > > What are you trying to guarantee by adding this? From a > > performance perspective, this is terrible as you're forcing the > > ITS to drop its caches and reload everything, making the interrupt > > latency far worse than what it should be on each and every vcpu > > migration. >=20 > Agree, this reduces performance. >=20 > >=20 > > We already issue a VINVALL when a VPE is mapped. Why would you > > need anything else? > >=20 >=20 > It is just for robustness, like the VINALL when a VPE is mapped. The VINVALL at the point a VPE is mapped serves a purpose: to invalidate the caches from a previous instance of a VPE with the same VPEID. It's not for "robustness" but for *correctness*. >=20 > >> > >> @@ -1327,6 +1327,7 @@ static void its_send_vmovp(struct its_vpe *vpe) > >> > >> desc.its_vmovp_cmd.col =3D &its->collections[col_id]; > >> its_send_single_vcommand(its, its_build_vmovp_cmd,=20 > >> &desc); > >> + its_send_vinvall(its, vpe); > >> } > >> > >> Do you think it's all right? > >=20 > > I think this is pretty bad. If your HW requires this, then we can > > add it as a workaround for your particular platform, but in > > general, this is not needed. >=20 > Got it, you are right :-). May I suggest that in the future, you post patches that actually serve a real purpose and avoid wasting people's time? Your company employs a bunch of good people, some of which are pretty knowledgeable when it comes to the GIC. Please consult with them before posting such thing. Thanks, M. --=20 Without deviation from the norm, progress is not possible.