Received: by 10.213.65.68 with SMTP id h4csp1061370imn; Thu, 22 Mar 2018 14:26:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELveNucQumZagx0zCMii/DCphUUU8AYos+3hswaZJ8NjdbFkffecXQ9ySM9Hkw1AYPmdV5RS X-Received: by 10.101.68.82 with SMTP id e18mr18915558pgq.329.1521753990470; Thu, 22 Mar 2018 14:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521753990; cv=none; d=google.com; s=arc-20160816; b=Myg1cusIEZtAwtLD7JCA3BuxSKmh2buF6ZaU7nW+siw6UZhCSilhku0RtetlAu2Pwo OXPOfDr0gzz/ILAeLbZtMk6gNis2vaecgzt8jDZV7bUbk2M9ueybYwD6fnokcrEu97dj 0Z4gXJMlrwFxQHIN+q8s8U23cHU7+P4AiXiVU6UMyUzB6y59DRrsZH440FJk5W2I4XR8 QoYDLjeJz9a+wVpF2mAxox8m44ocFmNO0IYeGurUilQAjS5d2n+Plhf4K9X1Ml9+umfx nbf70xw+opcZ3NazE8qYFfVVQESnuYzwZzt/g01yi+QCKDgki1ODDJD8Rw6SU8Qi2GIu LFLg== 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=5b4worh7VDlB2NTbAptU8OrK7suiXIKJXElLFRn0rug=; b=dXXsXCOSooXQN8T8NycT/2S80msCJHMD1SBzOzDBtRnG3o8DnyCGM20i3MzTcxEd30 Y+V6V28wfPBubmFqehuRYoyEBL5bDDEaGLmlHHkrWZ9U1rHHlv1Fqm7EuCXbKgHKV2VL Ha3TOeYRAu0ZWQtoXdEWb8I2M9GsPzUJ+l0v+CNf2C3Ee+MyWn1Za5UVSgkqFbXV8Hy1 r3Inn79oEh/3n4DOFP77w0zln0AY/3geK+v1m5FMR0yFZSJ3OAFEb1d1B5nUxEAV7SH2 tqagTh9C2l6iK0Iiysdi4rGMRevcrSPY/9NYp0rr0jnkcssR5E7elfz7HHcfz08ce0Cx hagw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=PaeRWWVb; 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 70-v6si7092026ple.372.2018.03.22.14.26.14; Thu, 22 Mar 2018 14:26:30 -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=PaeRWWVb; 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 S1751742AbeCVVZU (ORCPT + 99 others); Thu, 22 Mar 2018 17:25:20 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:34460 "EHLO mail-wr0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbeCVVZS (ORCPT ); Thu, 22 Mar 2018 17:25:18 -0400 Received: by mail-wr0-f171.google.com with SMTP id o8so10149981wra.1 for ; Thu, 22 Mar 2018 14:25:17 -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=5b4worh7VDlB2NTbAptU8OrK7suiXIKJXElLFRn0rug=; b=PaeRWWVb+TICO1eZnsZItTwjjuXUQmNIG/3qw//HN/IwQCeGa46rnF3liYYzCrtylT putguTtRba5FBmFSmL9P0y3bsWoT5AF/JjhxGN89hyoCBECwdD2KNE0xLfMl3T40x5wo 0TQl74SwnTG5Q4UJdF6NeOPKFn+MzGGqTQQ+tZ5OIRAJAOoAKT6RqxFANxw2KgPzBvGT AwqXsaaHeQc9Bh2vl67FvVCBPg7/zadi65EShtkJul9beAHXDW6asS2eBnffxBfg2E7u 3BHH5haOMpgsutmcTKNEDuD00E7PiiPlN37jDdkS3VlXKN1R1FHbAGK4PCqedPLd4m8O f4Pg== 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=5b4worh7VDlB2NTbAptU8OrK7suiXIKJXElLFRn0rug=; b=pMuV3rGV20l5muW+TqnpfDhZezrOJmE+unFbMdA/18+j3Itf2eOe9/lTGt/CuWF9xg /D/rYJoDVZWEDTwvqs6QAb53O0wGIdKJKLTzXd/bMR2A0MVAtv0PuBql+uFmTdhbQ55j nJwpAxhzjSC8OKgf172kmEwKitnQVehAOGctSmlIa4gYdTAEztn3yDAcHwvx3opdbB2a Elsp/K5PxZeAY0fxFro8LWqhZr4gewWxFAvZDG+3hTtcyMVqLj9OxfWiE43lVyckBsSl AAKP8KtIoj6GIyPwfIONP9+b9SHguA//6I9WGJlDWWSbkBmcGw6N1tx2tS1cIVHWd/b6 G/gQ== X-Gm-Message-State: AElRT7FkK+8ec+s288Cb5NZHAfttKYzk94LlvrrE0wk4YDjtlBFHi6Xn wfslPUd4bgxs+NE2t43r13tWNA== X-Received: by 10.223.128.201 with SMTP id 67mr20358450wrl.131.1521753917045; Thu, 22 Mar 2018 14:25:17 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id t91sm8905408wrc.21.2018.03.22.14.25.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 14:25:15 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1ez7hu-0002A0-Gc; Thu, 22 Mar 2018 15:25:10 -0600 Date: Thu, 22 Mar 2018 15:25:10 -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: <20180322212510.GE9469@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> <20180322201649.GC9469@ziepe.ca> 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 08:45:11PM +0000, Casey Leedom wrote: > I'm guessing~ that this line in the documentation ~may~ imply the GCC > ordering: > > ... Note that relaxed accesses to > the same peripheral are guaranteed to be ordered with respect to each > other. ... An arch can't guarentee "ordered with respect to each other" without preventing the compiler from re-ordering, so yes, any correct implementation of writel_relaxed must prevent compiler re-ordering. eg with volatile or a compiler barrier, or whatever. > In any case, we really only have a few places where we (the various Chelsio > drivers) need to worry about this: the "Fast Paths" where we have a lot of > I/O to the device. I think we should leave everything else alone. Yes. Jason