Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp2994937pxb; Sun, 20 Feb 2022 06:30:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzH2R1Jm2nW42RbAp7An50HCHAz+At+Q7x7t9DCMBVV1H72hmdaiFGsSVLF8J2S91TpZRoA X-Received: by 2002:a17:90a:7f81:b0:1b9:4485:3f01 with SMTP id m1-20020a17090a7f8100b001b944853f01mr17170081pjl.120.1645367439660; Sun, 20 Feb 2022 06:30:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645367439; cv=none; d=google.com; s=arc-20160816; b=rrdwr0IoUxmRmLvDOU78h6wPGQ83RH8jrET2+LqtNcuRCUE4PRzgt6gCnAcpp5L2Q8 Cks8NdKUdIyahpnSdZPDIy1FQoBUzMd5xcfrsMlpaICPjZYoBGXQJ4uSs1K7SmCTqR9n AEpJVyWC3BiBg+ZXoVBrf+dpYaTPH7AZuTKbbYpGocx1KdX2aNpENyRxHEZ2KGtlya+1 I3gb8tO0U0sxdWIUCkDUKxLGL+En7VFDzUSxLPHWJ2GK4RpXCq5PxTAVBzl7tBfaCzLd jHFCErNYYaISt5cz6Dwa9mc3nwKW9wt2iHEp+IGJSDZZ9zRVoqni3Jo5o175Atc0Xm4J QKnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HMkucds+kxtjcnG3k/F/AoaFoSF/vYyz3h50xuMKN+c=; b=ESFVaIaHkQLIr8HcfHa0rX6C0hz5TmHx92KiyRIrVfKZXIv1bTRs0YwylnJJek9RHL cPAlMMvZEIiCKOutYvedO5Zkeg7T3qH8NpzjKgwpC+WpSWIZKBstR235wlS6l5ZTjDTO wAMqh+BxtUnzQeReZldxYrY0mCIhPW+aJShFOX1O3rj1fu5UoX1AjnyhtFIq8Ltz5kf6 cRWcAIJYb/UfS6poDtiXXfTjAz/JD+snO/b0s0GMRcF47N9s0ovrKe9Eme9tvLJDpjwJ AWYePPnOAo3R8pyYS2+Ep87Jhg1e0VPZB3tzU+ItpMPHWN4wuyGh9mT8N3izUFjVgJpZ YneA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p1FZaPFp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w36si7012950pga.316.2022.02.20.06.30.21; Sun, 20 Feb 2022 06:30:39 -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=pass header.i=@kernel.org header.s=k20201202 header.b=p1FZaPFp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243860AbiBTNbB (ORCPT + 99 others); Sun, 20 Feb 2022 08:31:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243856AbiBTNa7 (ORCPT ); Sun, 20 Feb 2022 08:30:59 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DECF53723 for ; Sun, 20 Feb 2022 05:30:39 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id C9D82B80D43 for ; Sun, 20 Feb 2022 13:30:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 444CAC340F3 for ; Sun, 20 Feb 2022 13:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645363836; bh=lVGKars3UOdCl//7LKU/BqgNXSAU0gBEYzedjFnc06Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=p1FZaPFpCzGhzlml2yffcvVvW5md9R6P9sD1R4oMM0wySnjgbxYdRcPrukKSg8ZcW C49yptSWfSmmzpmGsUz8CCXcg1l+yQ78O9PM91U/e/Zi3D6pZEn8lO8LVFFmVnkcPS wXDrvnpO6l17acvca5UF8iWZl7J8JVwvPxhfs4Ib0LjBBVyZn38/n92ZQ2tDDeMe2P zKMqQmKwZtmtL/J7YlkuNb3gwfIMbglg7GMT5ttJmqESFNw4u70WHH7VhapxLL4SjQ 6I+6YnJU7uNy8RexusWyontBAPBtkcIp0LnvFezNPms9sPecvffynXCADjdhXRWqZp 6/tt5p2GsTQzA== Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-2d07ae0b1c4so111498197b3.11 for ; Sun, 20 Feb 2022 05:30:36 -0800 (PST) X-Gm-Message-State: AOAM532gFjgiH8j0u1cUsdIpclPaKgTeJdFDcCEZdpBgsrAIqKE4jT8L OPyQ5U2BQGzOwIzhjw4Lw83Wi5H3RX5s0I5SeeY= X-Received: by 2002:a81:84d5:0:b0:2d1:e85:bf04 with SMTP id u204-20020a8184d5000000b002d10e85bf04mr15790221ywf.465.1645363835400; Sun, 20 Feb 2022 05:30:35 -0800 (PST) MIME-Version: 1.0 References: <20220218215549.4274-1-song.bao.hua@hisilicon.com> <6432e7e97b828d887da8794c150161c4@kernel.org> In-Reply-To: <6432e7e97b828d887da8794c150161c4@kernel.org> From: Ard Biesheuvel Date: Sun, 20 Feb 2022 14:30:24 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] irqchip/gic-v3: use dsb(ishst) to synchronize data to smp before issuing ipi To: Marc Zyngier Cc: Barry Song <21cnbao@gmail.com>, Thomas Gleixner , Will Deacon , Linux Kernel Mailing List , Linux ARM , Linuxarm , Barry Song Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 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 ?