Received: by 10.213.65.68 with SMTP id h4csp222042imn; Wed, 21 Mar 2018 17:03:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELuSJvF92Lui3MLlYQ78oW2LKtsOaDw0I6DZR9LC+FeqCSUldKkWvttN6YCQPqJG2wHnzsD1 X-Received: by 2002:a17:902:bc3:: with SMTP id 61-v6mr22437206plr.398.1521676997663; Wed, 21 Mar 2018 17:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521676997; cv=none; d=google.com; s=arc-20160816; b=zw9VmFSZtEqy175E/CS7GGIjfMUj44/MRmi4z+vfnWIZeKAndBRqNIcJBBWQHnemZ1 ZdR3na1wrX00lhz+GVuQuJEqTud8qDJVSkQNT+T/UyZieYEBHH8prBf2MuNebt/CnC0A Aswqw5ByKp6prfRdmUglbmw1zMWjS/iF+mHM4Mlp9z2JvAA5kqmrcm6anmoPrlQZ+Vi4 JIpOSpmuNfawFXVFG/Kko7CrsrV6Vj6gVFTxBiSfexSgSNAGi5Jd05ZIx0+nDppITwCv 1g2JK/S60V2ZoqExgmyRmPpyQnoc9E8jJOE0I5ma78/49WjtJDOpE85M+vN4WgAxtNxc cwKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=irXEo8s6EzKiKOvxK06IZvJ62hMPZWHqVGB4Fp5++7g=; b=iTCqu3glM/2Okk1kGxRIqQWoQix2rojIUquEz8+yqFQsIWfffIKym6zChD681uEz/+ jFkq7j8nuko+s+v7H+5o9hM/Q4DltxLKPp44osVJahBgpRGzveHC6Finrobv8hcsEEK3 Z4tfIseEA0HsLtZlrTsu8wD7ruou/FGEsxhFywl/936el95WHIu8QsCfSbaj+2bpDHOB mZPqMLcwTf64XLJNX3GdioOv2EdQMNVNuSeK/L3L6jFz44GD2DKsP3ZBMG4FudY7frv1 6ODXP76h9ILU70v2fztOJzewW9AMXPMSkz+t4vM9DgpeJnSVfRmRRgXcQdnrS557v7sf LcKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Hzwitw30; dkim=pass header.i=@codeaurora.org header.s=default header.b=Qy2B56Ly; 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 o6-v6si5106433plh.300.2018.03.21.17.03.02; Wed, 21 Mar 2018 17:03:17 -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=@codeaurora.org header.s=default header.b=Hzwitw30; dkim=pass header.i=@codeaurora.org header.s=default header.b=Qy2B56Ly; 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 S1754185AbeCVABC (ORCPT + 99 others); Wed, 21 Mar 2018 20:01:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34412 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753614AbeCVAA7 (ORCPT ); Wed, 21 Mar 2018 20:00:59 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 383CC60C67; Thu, 22 Mar 2018 00:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521676859; bh=Gd4OhSWjIQQafkabKDyJ6t4SXocT1z022e7CslvW3yQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Hzwitw30FPyb2Lpol12edT9XV1PcaH2qrmUtNWr9onshIiiRMBC4JuqFMtLygjiou P0AQfxqP2HHQXkDOQa6HBLtYHLQZRApbB8zncibkO5h1oFy04Jp/QAsmQaZ/2mIywa 33KN4ehMiTF3arVNRFDwXUjpM8C13dvBUmF7yzkg= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 9CA2960386; Thu, 22 Mar 2018 00:00:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521676858; bh=Gd4OhSWjIQQafkabKDyJ6t4SXocT1z022e7CslvW3yQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Qy2B56Ly/TpkK+WUOpjtw8oiY2k0UnZsgmaGQo96k5iO5x4fH1N2xObUBXnTyDexS TsW2mkggcS4/JcVIvjQpUs/fh2tBPSzU3yfgVMMLvAt3VgpJzBydz86N5DxACneWZ8 H5sezr12Ng3mf5d3iVOAzzMYUnEmjfrG6K4RJpEU= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 21 Mar 2018 20:00:58 -0400 From: okaya@codeaurora.org To: Casey Leedom Cc: netdev@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ganesh GR , linux-kernel@vger.kernel.org, Michael Werner , SWise OGC Subject: Re: [PATCH v4 12/17] net: cxgb4/cxgb4vf: Eliminate duplicate barriers on weakly-ordered archs In-Reply-To: References: <1521513753-7325-1-git-send-email-okaya@codeaurora.org>,<1521513753-7325-13-git-send-email-okaya@codeaurora.org> Message-ID: <11820921c76403bca743c382287aee05@codeaurora.org> X-Sender: okaya@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-03-21 19:03, Casey Leedom wrote: > [[ Appologies for the DUPLICATE email. I forgot to tell my Mail Agent > to > use Plain Text. -- Casey ]] > > I feel very uncomfortable with these proposed changes. Our team is > right > in the middle of trying to tease our way through the various platform > implementations of writel(), writel_relaxed(), __raw_writel(), etc. in > order > to support x86, PowerPC, ARM, etc. with a single code base. This is > complicated by the somewhat ... "fuzzily defined" semantics and varying > platform implementations of all of these APIs. (And note that I'm just > picking writel() as an example.) > > Additionally, many of the changes aren't even in fast paths and are > thus > unneeded for performance. > > Please don't make these changes. We're trying to get this all sussed > out. > I was also given the feedback to look at performance critical path only. I am in the process of revisiting the patches. If you can point me to the ones that are important, I can try to limit the changes to those only. If your team wants to do it, I can drop this patch as well. I think the semantics of write API is clear. What was actually implemented is another story. I can share a few of my findings. A portable driver needs to do this. descriptor update in mem wmb () writel_relaxed () mmiowb () Using __raw_write() is wrong as it can get reordered. Using wmb()+writel() is also wrong for performance reasons. If something is unclear, please ask. >