From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sinan Kaya Subject: Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs Date: Tue, 27 Mar 2018 10:23:32 -0400 Message-ID: References: <1521831180-25014-1-git-send-email-okaya@codeaurora.org> <1521849496.15055.16.camel@intel.com> <862cdbeafb9cfd272a426b010943ffc5@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Jeff Kirsher , Alexander Duyck , intel-wired-lan , Netdev , Timur Tabi , sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org To: Lino Sanfilippo Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:37354 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbeC0OXg (ORCPT ); Tue, 27 Mar 2018 10:23:36 -0400 In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 3/27/2018 10:04 AM, Lino Sanfilippo wrote: > Hi, > >> Double sorry now. >> >> I don't know if you have been following "RFC on writel and writel_relaxed" thread >> or not but there are some new developments about wmb() requirement. > > Just out of interest: Where can this thread be found? https://www.spinics.net/lists/linux-rdma/msg62570.html https://patchwork.kernel.org/patch/10309913/ > >> >> Basically, wmb() should never be used before writel() as writel() seem to >> provide coherency and observability guarantee. >> > > AFAIU memory-barriers.txt writel() only guarantees correct order of accesses to > IO-memory not RAM vs. IO-memory (this may be the case for some architectures > where the writel() implementation contains a wmb() but not for all). > For the RAM vs. IO-memory case at least a a wmb()/rmb() has to be used. > Is this not correct? We are being told that if you use writel(), then you don't need a wmb() on all architectures. Jason is seeking behavior clarification for write combined buffers. > > Regards, > Lino > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.