Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4667204pxj; Tue, 22 Jun 2021 05:33:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbkYHwpCg7GaGmn5yICBgoX4Zw3sL1zTOjzfqPdDKf/mywVx57srZjPypy7MrF5a2Zpfa7 X-Received: by 2002:a05:6e02:1bab:: with SMTP id n11mr2333051ili.95.1624365237382; Tue, 22 Jun 2021 05:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624365237; cv=none; d=google.com; s=arc-20160816; b=bjuVknxkuCAUWnzMm46GOzCmz1TN2HJJMSURKGuYNCx3oosHmOgDrUYzs/uvaeFrXJ Ieb+nO4Pwcyd2URUGiB40ayYopKyBcv6j4/kYVBouNV1SpDhn4w6E6VMoRJnljSrf3Cb i9Bq9pwsnHbVbpqm2wOxac3ujVUuhtZcIt1E2Wj145kYrDmHP3rt+uleN8ty2AiFiBhv KHUYotyC43PpF0SurD/WecGGnPxVf+imhw0QrxPuqB7e60+bXkJiZO7ts+cPnRtpfel0 oxgolWdOvjewDXVCrZ9lX3rDBd8mMBGdSL/JazxOcyXrh5Rli6mT61tLH5Ddi2fcNduK 5WPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=4VeEsz7Z9vY182YLBgpqNYM11x3+wXCNYn3a19vEo1o=; b=M/b9Nl09zjp7+I9IqW89yTu7PFXLNvnisnLMnb5GoWKGND6BYmMjeg2GdZZE1YsBWx SwahTv5UA4TeoCGEQgYRb3xJrF1QpFY5Z4KbcUfSow5TCwmMzReEtmLyejxmIMHtaWyv 4Iss0/CvYlhiRdC/QfIYt6BNbNGvTdHSMxQKUQmMVgnZGvhf9DW9HHIY4Kr0SqOcMwH+ K9KvdJ1gbVoIf4wVwGXbrtPfeyM4SQjvy8HBco5jSt8j9C4acB3I+mdEsCJDx1RD1Hj5 lfctwQ1lC4jx+utleJk5bsp4/cN8alYQkEi8KO+WvDLBmDDVNErPKVlHS0E7JNG3FoNi VAuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si22540891jas.57.2021.06.22.05.33.45; Tue, 22 Jun 2021 05:33:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231694AbhFVMff (ORCPT + 99 others); Tue, 22 Jun 2021 08:35:35 -0400 Received: from foss.arm.com ([217.140.110.172]:48474 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbhFVMfe (ORCPT ); Tue, 22 Jun 2021 08:35:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5DDE8ED1; Tue, 22 Jun 2021 05:33:18 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.10.229]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 78E0C3F694; Tue, 22 Jun 2021 05:33:15 -0700 (PDT) Date: Tue, 22 Jun 2021 13:32:21 +0100 From: Mark Rutland To: Will Deacon Cc: Guangbin Huang , davem@davemloft.net, kuba@kernel.org, catalin.marinas@arm.com, maz@kernel.org, dbrazdil@google.com, qperret@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lipeng321@huawei.com, peterz@infradead.org Subject: Re: [PATCH net-next 1/3] arm64: barrier: add DGH macros to control memory accesses merging Message-ID: <20210622123221.GA71782@C02TD0UTHF1T.local> References: <1624360271-17525-1-git-send-email-huangguangbin2@huawei.com> <1624360271-17525-2-git-send-email-huangguangbin2@huawei.com> <20210622121630.GC30757@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210622121630.GC30757@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 22, 2021 at 01:16:31PM +0100, Will Deacon wrote: > On Tue, Jun 22, 2021 at 07:11:09PM +0800, Guangbin Huang wrote: > > From: Xiongfeng Wang > > > > DGH prohibits merging memory accesses with Normal-NC or Device-GRE > > attributes before the hint instruction with any memory accesses > > appearing after the hint instruction. Provide macros to expose it to the > > arch code. > > Hmm. > > The architecture states: > > | DGH is a hint instruction. A DGH instruction is not expected to be > | performance optimal to merge memory accesses with Normal Non-cacheable > | or Device-GRE attributes appearing in program order before the hint > | instruction with any memory accesses appearing after the hint instruction > | into a single memory transaction on an interconnect. > > which doesn't make a whole lot of sense to me, in all honesty. I think there are some missing words, and this was supposed to say something like: | DGH is a hint instruction. A DGH instruction *indicates that it* is | not expected to be performance optimal to merge memory accesses with | Normal Non-cacheable or Device-GRE attributes appearing in program | order before the hint instruction with any memory accesses appearing | after the hint instruction into a single memory transaction on an | interconnect. ... i.e. it's a hint to the CPU to avoid merging accesses which are either side of the DGH, so that the prior accesses don't get indefinitely delayed waiting to be merged. I'll try to get the documentation fixed, since as-is the wording does not make sense. Thanks, Mark.