Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3595081pxb; Mon, 21 Feb 2022 01:19:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsMC2SabsBbMZIHSLQsemEPOHrdAG3tL3AoCwtywCpKxk7VvN4vnyDk37+2lNoOFIrOQNK X-Received: by 2002:a63:543:0:b0:374:62b7:8ab0 with SMTP id 64-20020a630543000000b0037462b78ab0mr380710pgf.384.1645435187932; Mon, 21 Feb 2022 01:19:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645435187; cv=none; d=google.com; s=arc-20160816; b=NBNPrehoc5YJQvQa9gruWQRGla3j80FwMGWqNc0DbUmgEbWqsf2WPJ0sD4C7YC/ZeK jooNpjvI4cGy/FR3mBQYprkR2Lue1v8873BRqWXzSQAV6c+Pt7aiHEH+cojvxQLP3L+r HTItcIXHqpisbcgJAvFf2gsXh4uULKMjOaafa09vV2JaQkToT34fly5sqmwMpzgqwC0Z 6I43+XDycdezKHj9ByLUboPrbLHpNPzc/6M+OnVUJwnuPnbtEl39pluDfgsQjhZlDvRD hShr0PVRtjgpZeZXXFWGUWRGO7goWPz+PhYY3529naQZsOV61fh7GM18q7eQfm6kcr1K Y5pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Hx07QwGIcmDyJPlDIB9QXqGTx5LC42XoxgPoFwSTsRM=; b=xSNR4NnuoAeBqzTjduRhrytdSFVc7ggxBaT4gAq5Mc0w1BjnZujCgZ5UJGFUhEEUHH T/hR4Xj+vgKa/QeiKtWgKjnBXtBqR0lHHElDmE6WU71ZjlVfeukEMBwUDcZrYxWN+sQ7 oCJI/eBOVRbJHps9QV/sefCyH88cNsIjzQERkkeq3LNts0XDJ1IJqAXhGlOGy9cHLD2v 6TrqxCk1rWBCjnlX+CztfxuiKZqk6rU3Jin49DGLqv++EEVIoD2NrQtKLadWSk/VTduC nZR83qyq5DPMU3PbOllfnv/W5m5a1zGsiSYIixZZlOsrkzIN89O20ng4UbmPvxpCdFZ8 jf9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Bv4UBb1+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch22si6005069pjb.183.2022.02.21.01.19.34; Mon, 21 Feb 2022 01:19:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Bv4UBb1+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244154AbiBTPGB (ORCPT + 99 others); Sun, 20 Feb 2022 10:06:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243839AbiBTPGA (ORCPT ); Sun, 20 Feb 2022 10:06:00 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0D0131DC8 for ; Sun, 20 Feb 2022 07:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Hx07QwGIcmDyJPlDIB9QXqGTx5LC42XoxgPoFwSTsRM=; b=Bv4UBb1+i2NdY4g+/Z5zrAZMV7 t4LEdq1Mel8kuOPT+jvhRaw2pyjfAXII4C53wkmCFEpdczqqg1IhaJF+U80ItRczOQFHFoGbQAHZk A+0sHrR4Y8AlySGcoWzwro4kwh/+XPAkFgkKMZLBOwqUznm0vWEV+lk1kp5+LheMnSS6usZdUtIlK drfwJjI2XD5BTxObu9KgMcyfh1S/WfOG6SKcE0G8a38itBqcQawMShGpArqCeIy7CzEF4MHGB3UHS V7EbcajqEiuQPQVXpAe4pN3NTO1p1Ku8SP0MZpifJ+L8Sfc2mcCyh1P8QigFnIjDP6t2bpQILJceU RPRYH/Dg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57380) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nLnmG-0007m7-J2; Sun, 20 Feb 2022 15:05:32 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nLnmG-0006RM-0J; Sun, 20 Feb 2022 15:05:32 +0000 Date: Sun, 20 Feb 2022 15:05:31 +0000 From: "Russell King (Oracle)" To: Ard Biesheuvel Cc: Marc Zyngier , Barry Song <21cnbao@gmail.com>, Thomas Gleixner , Will Deacon , Linux Kernel Mailing List , Linux ARM , Linuxarm , Barry Song Subject: Re: [PATCH] irqchip/gic-v3: use dsb(ishst) to synchronize data to smp before issuing ipi Message-ID: References: <20220218215549.4274-1-song.bao.hua@hisilicon.com> <6432e7e97b828d887da8794c150161c4@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 20, 2022 at 02:30:24PM +0100, Ard Biesheuvel wrote: > On Sat, 19 Feb 2022 at 10:57, Marc Zyngier wrote: > > > > On 2022-02-18 21:55, Barry Song wrote: > > > dsb(ishst) should be enough here as we only need to guarantee the > > > visibility of data to other CPUs in smp inner domain before we > > > send the ipi. > > > > > > Signed-off-by: Barry Song > > > --- > > > drivers/irqchip/irq-gic-v3.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/irqchip/irq-gic-v3.c > > > b/drivers/irqchip/irq-gic-v3.c > > > index 5e935d97207d..0efe1a9a9f3b 100644 > > > --- a/drivers/irqchip/irq-gic-v3.c > > > +++ b/drivers/irqchip/irq-gic-v3.c > > > @@ -1211,7 +1211,7 @@ static void gic_ipi_send_mask(struct irq_data > > > *d, const struct cpumask *mask) > > > * Ensure that stores to Normal memory are visible to the > > > * other CPUs before issuing the IPI. > > > */ > > > - wmb(); > > > + dsb(ishst); > > > > > > for_each_cpu(cpu, mask) { > > > u64 cluster_id = MPIDR_TO_SGI_CLUSTER_ID(cpu_logical_map(cpu)); > > > > I'm not opposed to that change, but I'm pretty curious whether this > > makes > > any visible difference in practice. Could you measure the effect of this > > change > > for any sort of IPI heavy workload? > > > > Does this have to be a DSB ? Are you suggesting that smp_wmb() may suffice (which is a dmb(ishst)) ? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!