RFC on writel and writel_relaxed
okaya at codeaurora.org
Wed Mar 28 09:35:34 AEDT 2018
On 3/27/2018 5:54 PM, Alexander Duyck wrote:
> I view the wmb() + writel_relaxed() as more of a driver owning and
> handling this itself. Besides in the Intel Ethernet driver case it is
> better performance as our wmb() placement for us also provides a
> secondary barrier so we don't need to add a separate smp_wmb() to deal
> with a potential race we have with the Tx cleanup.
Thanks for the reminder.
I forgot about the double barrier optimization. wmb() + writel_relaxed()
seems to be the best option for Intel network drivers at this moment.
Otherwise, we'll have to remove wmb() and throw in smp barriers there
like you mentioned.
I'll leave the changes in the Intel drivers alone.
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.
More information about the Linuxppc-dev