Received: by 10.213.65.68 with SMTP id h4csp504751imn; Tue, 20 Mar 2018 08:25:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELvvYNLkjzlpbsNBgwjT1y5orLW+5FNFo/3WUqChv5Hkh4WzdCC5TxWMriPo7IPa0mS1FRRC X-Received: by 2002:a17:902:2803:: with SMTP id e3-v6mr17255032plb.238.1521559508799; Tue, 20 Mar 2018 08:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521559508; cv=none; d=google.com; s=arc-20160816; b=JPQVXSGyVshgSxbkVRdsAhB6mChnojeYKwpM7D+kWFGssXvfnE6AFBM343AfLif9IY 8aIUZ4mpdHvVf1mBorZMDrb2WpJ2AosMoyVPj10EhH+zRF9tJTUGECl2SNfGVCy3GmEi 2i1s4u7cIiK2MrMJf2H2rC2RDoRkll5ZdziYeTIXfuY1B5mZgPuKVZX5uPUvvgldHOi8 /cvzZ1HoYspwlqn+H/MYcaZMke4Jp9prcTP4k5HDcNg2dxVLvmVyLJga6DaSvbhoh7y6 p6KxpaVuQHpx2EhLlTOqjvN5RnkLLXm+qtGcTofK82dZXdg/SDNkIaJ8uLczpkJ9FNQd 9BQg== 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=/WGdQp1NC+EQ/MIhvUaWQ0xa8/0oetg4TyNWC5O5urM=; b=fQQM4Mv62y4zLpoOdaCRsuuCyiZ4xH4KqJ+6lsCuFxpCGmoDSGpnl4RM987UFymiNG VO4m64RGsdXtATpjg97YNeoRKbWBlyJ4c/jpVOD/4M0hY+iFhfhecVA4qmgcP6HF7of6 usRnBUoi0r23xMxRHuYGCyH34hx6L+3pJD378GzOX0FK+niti4FcoYcw740qJQ1TkEdG xje77I6F97sjBaq5jsoMX6UNNuWncjiLe+NNTcB3RlCaFa4x8eulpAvmZGb+Sgb1EjWJ mZmt19ls9aKLJaClXTmEb+dIN/anN1sNPT5lGh8VK2rJnBB2HrIOZdm6hA0qxTeu99zR 93Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=XKw9W4g9; 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 l14si1324939pgu.581.2018.03.20.08.24.54; Tue, 20 Mar 2018 08:25:08 -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=XKw9W4g9; 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 S1751633AbeCTPYH (ORCPT + 99 others); Tue, 20 Mar 2018 11:24:07 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:46832 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbeCTPYF (ORCPT ); Tue, 20 Mar 2018 11:24:05 -0400 Received: by mail-wr0-f194.google.com with SMTP id s10so2096462wra.13 for ; Tue, 20 Mar 2018 08:24:04 -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=/WGdQp1NC+EQ/MIhvUaWQ0xa8/0oetg4TyNWC5O5urM=; b=XKw9W4g92ZC8T6oVM36v/ixm15scT1/GeeiBLG8TXTBaJRcw3U4noXQ36iReXYO0LR Rs3bdaxK3j1O4XA0JuRJfXZ2EJjRdyGm9E9xkZQWTXbaZbxFQXpjtr8HhKpAfLVijKJ5 fWhku4+k4Cvm5YsI7iBcHJeoR2Yk2gqZQSwPpxXVhtv6+cBVUTm32h/E15hspqZbjdNr tsdf7CJzB6acnLbu+p7qr/MR+l0Ye24MPJSG6I1lptI24G83MXOYenCyGZQBPreRCmc+ xd1faKRxtHQiaOEMwhxsKbIMHOv1TwW0HqgWvVwMeQxeLC20eJnaTCpJesFHjO/3XILZ K7sg== 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=/WGdQp1NC+EQ/MIhvUaWQ0xa8/0oetg4TyNWC5O5urM=; b=Rg3/4ox2hhJEdo1iwVez5zBjMtFOMCLVgvRcZBWj95XSScek9SmGcChvGLuTRpWBY5 Tpra7v1WDKb9023omAiMROUfi8Oq2X8VjenUtzmT1wgSIzjYl+8002xriMpWrtnMFkr7 Y29Hx6FNuzrT6ePicfn2ZnjYDBegyhK91IlL6PLo4Ddis82g/jEGAhHfeIhvqih9RY2a Aa71YW2k8HayappCVLcAypcbR1lIWkqv1+lOD1BfUOepT7DJ05ZRN2ciA/nYWYRDJAo9 SW4s6U4wVX6W4E1kLKBXLL0dqXdbO5jBQj9+YSVCBqIm7XurgbwkO3vs8us7Pv5fiqb5 VC6Q== X-Gm-Message-State: AElRT7ETgTMhmDL9nIQGzGOMU0zJhqNqNp+oBx+OaTb9+glHul9ITAhU j68YQ77jOrkRnEDBbLeHHOLQXQ== X-Received: by 10.223.146.133 with SMTP id 5mr14026897wrn.109.1521559443922; Tue, 20 Mar 2018 08:24:03 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id k20sm1850085wre.67.2018.03.20.08.24.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 08:24:03 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1eyJ7H-0006W0-AJ; Tue, 20 Mar 2018 09:23:59 -0600 Date: Tue, 20 Mar 2018 09:23:59 -0600 From: Jason Gunthorpe To: Sinan Kaya Cc: linux-rdma@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Selvin Xavier , Devesh Sharma , Somnath Kotur , Sriharsha Basavapatna , Doug Ledford , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/6] RDMA/bnxt_re: Eliminate duplicate barriers on weakly-ordered archs Message-ID: <20180320152359.GL19744@ziepe.ca> References: <1521514068-8856-1-git-send-email-okaya@codeaurora.org> <1521514068-8856-2-git-send-email-okaya@codeaurora.org> <20180320144801.GE19744@ziepe.ca> <3e6cfa25-6b9f-24ff-499a-6df2740b658b@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e6cfa25-6b9f-24ff-499a-6df2740b658b@codeaurora.org> 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 Tue, Mar 20, 2018 at 10:08:16AM -0500, Sinan Kaya wrote: > Never mind, it will break some architectures. I'll only change the first one. > > (1) On some systems, I/O stores are not strongly ordered across all CPUs, and > so for _all_ general drivers locks should be used and mmiowb() must be > issued prior to unlocking the critical section. I think the kernel could do well to have a spin_unlock_mmiowb() function. We have this patern quite a bit. Arches like x86 can just make it == spin_unlock, while PPC and ARM can add their extra barriers. Then we can safely and efficiently use _realxed within such a spinlock region. Jason