Received: by 10.213.65.68 with SMTP id h4csp516170imn; Tue, 20 Mar 2018 08:40:00 -0700 (PDT) X-Google-Smtp-Source: AG47ELtu2yLz2Hvqc5eDbUM738mgVcJUP5kEz9VrX178pJ1Zlk3m5k7ct8CSbCpuIzYbHyaGHkXJ X-Received: by 2002:a17:902:8bc2:: with SMTP id r2-v6mr6748130plo.169.1521560400030; Tue, 20 Mar 2018 08:40:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521560400; cv=none; d=google.com; s=arc-20160816; b=eDcfLai+Y54/UllMeKNe9UG7FHgNoKwyRNzDFRiZ3d5p4tQvHuQuB/OVpxFClST/Ld a6498e4k8BdXvy3DSh5asr6Nwi8yxQ9suorK+R3stNCRnH2bWQFdsAZlXhaDIJAU2is9 OKdQMPody4+vA6wdoc8e5EytNs3A5K1h7Vf4ZdGDNjkHHOYe4oEASOpBrmWX1rst9uea XIfM7UfG1vlPqrwLb6VTO82hivS7hCk4MKNE5+b5AlfEVlpVlHSiSNU62Bwudcb8e/Va XRs9dqA62Qzwh0vo6hwDv8FAVTapTYddmCQXTvfz/ExQdbOCz6/4cMSNFJjmBdJx4D3A rapw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:content-language :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:arc-authentication-results; bh=3hN9MeiH7dBVN4igatMNqNJ7KBJtIn3z1MgyBWs2yTo=; b=b2tWZHyUlCM9WlJTSMHAR/Fs6Clop3+jSPwvOn/m6aztjUUbkfTaQhctuR2JJrvBkt W/wCJQbeLQpFeaX4ZKfxRO3xjZ4/UpTtf4SJUf/mxJUdbTJWQYmVP4XZRMNuZaUGlvYc 83iMpsWcnvyB8pw8rxkucwCWgMcogD0YjLx5wYqbhsfCewFdFNgRYlVyeewAPTZfRlWT 7Z6pozg7Q1pi+5yNF5ZmEqfJZ/QS43gEozlJ92yzyrenoDYxehxVbsPi7tebvipFdqkU tlAqdIJ4Ai2RS/WZPrN0hIBduN+B4RlBp9L0vOzpyYjucifWhkDTYnr/Kl2qUkqP1Pu9 S42w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k196si1331883pgc.775.2018.03.20.08.39.45; Tue, 20 Mar 2018 08:39:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751522AbeCTPig (ORCPT + 99 others); Tue, 20 Mar 2018 11:38:36 -0400 Received: from linode.aoot.com ([69.164.194.13]:56860 "EHLO linode.aoot.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbeCTPie (ORCPT ); Tue, 20 Mar 2018 11:38:34 -0400 Received: from stevoacer (47-221-140-100.gtwncmta03.res.dyn.suddenlink.net [47.221.140.100]) by linode.aoot.com (Postfix) with ESMTP id 0BDFB837D; Tue, 20 Mar 2018 10:38:34 -0500 (CDT) From: "Steve Wise" To: "'Jason Gunthorpe'" , "'Sinan Kaya'" Cc: , , , , , "'Steve Wise'" , "'Doug Ledford'" , References: <1521514068-8856-1-git-send-email-okaya@codeaurora.org> <1521514068-8856-5-git-send-email-okaya@codeaurora.org> <20180320145159.GG19744@ziepe.ca> In-Reply-To: Subject: RE: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs Date: Tue, 20 Mar 2018 10:38:33 -0500 Message-ID: <3d9b01d3c061$8173d890$845b89b0$@opengridcomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-us Thread-Index: AQJnohsAzCjMC8iCAg840eHfO7WHuQE8ydHJAazdTfQB/pHyGaKKPMXg Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On Mon, Mar 19, 2018 at 10:47:46PM -0400, Sinan Kaya wrote: > > > Code includes wmb() followed by writel(). writel() already has a barrier > on > > > some architectures like arm64. > > > > > > This ends up CPU observing two barriers back to back before executing > > the > > > register write. > > > > > > Since code already has an explicit barrier call, changing writel() to > > > writel_relaxed(). > > > > > > Signed-off-by: Sinan Kaya > > > drivers/infiniband/hw/cxgb4/t4.h | 14 +++++++------- > > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > > > diff --git a/drivers/infiniband/hw/cxgb4/t4.h > > b/drivers/infiniband/hw/cxgb4/t4.h > > > index 8369c7c..6e5658a 100644 > > > +++ b/drivers/infiniband/hw/cxgb4/t4.h > > > @@ -457,7 +457,7 @@ static inline void pio_copy(u64 __iomem *dst, > u64 > > *src) > > > int count = 8; > > > > > > while (count) { > > > - writeq(*src, dst); > > > + writeq_relaxed(*src, dst); > > > src++; > > > dst++; > > > count--; > > > > This is another case where writes can be re-ordered.. IIRC dst is WC > > BAR memory, so the NIC should tolerate re-ordering, but Steve will > > have to ack this. > > > > Yes, this is WC BAR memory. The goal is that pio_copy() will enable write- > combining this into a single 64B pci-e transaction. > I'd like to see the PPC issue resolved...but Acked-by: Steve Wise