Received: by 10.213.65.68 with SMTP id h4csp1009715imn; Thu, 22 Mar 2018 13:19:25 -0700 (PDT) X-Google-Smtp-Source: AG47ELunfjhQuxxqOp5Aokp+oEIUg/z6iDL3HMoSwDSKGxvkcny6Ks5QqT1xso5i1qT5Xrko3BIQ X-Received: by 2002:a17:902:1486:: with SMTP id k6-v6mr26320467pla.376.1521749965164; Thu, 22 Mar 2018 13:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521749965; cv=none; d=google.com; s=arc-20160816; b=ZPHgO89kss+5GIYzNYOeb817+7+kZ75jV0YB31xX2S7tQ7mvV0sYD7bMJHhO9UK60e r+VgLSRvoFrSDR0zGvUaELmU/DYT4WeE+0Zu717ekgSuYRGg+RlINUNaSmGi1QlTzz7s D9XQzq3otMWO19lnp4buDCvgSaOLe1JqcDa1fSSc2dI3PiH/op3VXUzyo9BrLVywyQBx gn3mBpxzU/yKFc/QfLL91EoylXLAkn91ISnbpMqe5/1sojWMcj+qDb52wwNk1O4HhaLQ myb2SUOQ9F5GxbPw86bsZSMBu7ATHh65rfqWB1Dot5VmRk1idaTCb7cuag1BWjkMxTCK Jm3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=MJPe/mAbJd/YVSP9KobGCH53S9IVlygIX+EzOJPiQFw=; b=rVXSCOBpD6/KbGelqRRRfw3qm3dGfJs/R3l4we0/cXKTj2ncoKAxXlkMgPrUFsfvsm 6OfvdrBOdWCMMMDx0rohokxiE+lGfJMeIOLqmMLBHFbeuAVMPp6ShuHqg5QpjpUup4jb 9byU1XPwuYwoC60jNuRuUToe/0hr2S96RFO1qlswYtG53dE95D8FIGBwh+a35Pc5V51V kX2UsIUZTZqq07Js93MwzCebbLWKl9s2BTzCPSos1YdVjQqwmrD4EAgXBo14/QWder9E vroPVDBtit/hSDfAsiPTYWKRTvEP4nWMs9heAaOxTaLRYWl3wJSv+aH2FdpMywlYlb19 Dr8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=EUgjfyao; 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 u45si4908903pgn.702.2018.03.22.13.19.09; Thu, 22 Mar 2018 13:19:25 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=EUgjfyao; 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 S1751771AbeCVUQ7 (ORCPT + 99 others); Thu, 22 Mar 2018 16:16:59 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:36619 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbeCVUQ5 (ORCPT ); Thu, 22 Mar 2018 16:16:57 -0400 Received: by mail-wr0-f179.google.com with SMTP id d10so9982973wrf.3 for ; Thu, 22 Mar 2018 13:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MJPe/mAbJd/YVSP9KobGCH53S9IVlygIX+EzOJPiQFw=; b=EUgjfyaoDJCzPiIrDvEFymvhcMYDwtfUY6rVRsmINVbn5QZm/9uXu0a3qNAVmMKcem 6WzBCJWgS/gX4JtliIJJxHYeptAejIgjZ0zRsjWGJOaYAPL4JxYsLLF5Q1JCREaulWsY 2DV3+bQkqX37in+F6IHTqhF5KQMDuzI3nk2FUxtWwEie4K2Q9h0vu5cM0j+hRIXRWdWu IoQEpW3ka9E9e6XGii8iyoeIzytm2Ufc2BVDfa7rGXiJ8XZvt+dAFfxQ2upQ9im9i2Jf LpOHrzoOLA864xPmL0rLj2BbyODz40oJd061CljDvbhMtbnSMFrggYFkF+tKjS/0w8+J /nhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MJPe/mAbJd/YVSP9KobGCH53S9IVlygIX+EzOJPiQFw=; b=UU+7En6wcDaFONHKbJ/s37WuxylMv60ZB5L+A7yvrzPOoWCO0etYpdosXznB3m6TZn gw+SHvTjNfa3RoyH9z9rlgKOK43qc2BWSvFvfxrisg6LsSBwrcpaVLqXCgy098UgdzNN IRxtdXZGfTxTl79X7B3NNh7Sp/iIJXQi/vN0gwoqWX9xqXYo/RE6Xd/oVGNbsFjUIn3I O+ba6t7xUFveQoqcOWFUNKw+VTDEI2EIuiT+qoLNUqc5Kod+lpJu+2JYPkfyQDctZ7hR 2R/fRFfzfaCNPyT7sU2QOlgPt9BRn7mLp8DxKXoeWy6DInO6lxqciVfm0hbQJxOa5El2 hV4w== X-Gm-Message-State: AElRT7FsvfJI43jLlDRvoknbaM/DlZ7ECNKgXTiMYwwGEm7o7rBSW1UA oDb8AUsbY6YioMBMPcsieYT1rA== X-Received: by 10.223.175.70 with SMTP id z64mr22357381wrc.254.1521749816233; Thu, 22 Mar 2018 13:16:56 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id v53sm6480792wrc.45.2018.03.22.13.16.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 13:16:54 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1ez6dl-00085U-Ua; Thu, 22 Mar 2018 14:16:49 -0600 Date: Thu, 22 Mar 2018 14:16:49 -0600 From: Jason Gunthorpe To: Casey Leedom Cc: SWise OGC , Sinan Kaya , 'kbuild test robot' , "kbuild-all@01.org" , "linux-rdma@vger.kernel.org" , "timur@codeaurora.org" , "sulrich@codeaurora.org" , "linux-arm-msm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Steve Wise , 'Doug Ledford' , "linux-kernel@vger.kernel.org" , Michael Werner Subject: Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs Message-ID: <20180322201649.GC9469@ziepe.ca> References: <1521514068-8856-5-git-send-email-okaya@codeaurora.org> <201803221430.P43GJl9U%fengguang.wu@intel.com> <3664b253c730dbf83f4528acaedb3a88@codeaurora.org> <3e9c006e4541acbce11743dbda553e84@codeaurora.org> <03d201d3c1eb$b71fb460$255f1d20$@opengridcomputing.com> <83484a3f-d3f7-d763-e4f8-e4fec3bb8cc2@codeaurora.org> <52cbc9d7-5a6b-5c8b-b930-058f5be62079@opengridcomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 22, 2018 at 07:44:51PM +0000, Casey Leedom wrote: > | From: Steve Wise > | Sent: Thursday, March 22, 2018 9:28 AM > | > | | From: Sinan Kaya > | | Date: Thursday, March 22, 2018 7:52 AM > | | > | | Isn't this a PowerPC problem? Why penalize other architectures? > | > | I worry it breaks PPC. > > And all other architectures. Aparraently there isn't a formal API > description for writel_relaxed() and Co., nor __raw_writel(), etc. We have this: Documentation/memory-barriers.txt lines 2600-2677/3136 85% (*) readX_relaxed(), writeX_relaxed() These are similar to readX() and writeX(), but provide weaker memory ordering guarantees. Specifically, they do not guarantee ordering with respect to normal memory accesses (e.g. DMA buffers) nor do they guarantee ordering with respect to LOCK or UNLOCK operations. If the latter is required, an mmiowb() barrier can be used. Note that relaxed accesses to the same peripheral are guaranteed to be ordered with respect to each other. Which basically says they are the same as writel() except they are not required to be contained by a spinlock, which is the expensive thing ARM and PPC are doing with the barriers in writel() Jason