Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
On 3/27/2018 12:54 PM, Jeff Kirsher wrote: > On Tue, 2018-03-27 at 08:42 -0400, Sinan Kaya wrote: >> On 3/23/2018 10:34 PM, ok...@codeaurora.org wrote: >>> On 2018-03-23 19:58, Jeff Kirsher wrote: On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: > On Fri, Mar 23, 2018 at 11:52 AM,

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Jeff Kirsher
On Tue, 2018-03-27 at 08:42 -0400, Sinan Kaya wrote: > On 3/23/2018 10:34 PM, ok...@codeaurora.org wrote: > > On 2018-03-23 19:58, Jeff Kirsher wrote: > > > On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: > > > > On Fri, Mar 23, 2018 at 11:52 AM, Sinan Kaya > > > org> > > > > wrote: > >

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
On 3/27/2018 10:38 AM, Alexander Duyck wrote: >> We are being told that if you use writel(), then you don't need a wmb() on >> all architectures. > I'm not sure who told you that but that is incorrect, at least for > x86. If you attempt to use writel() without the wmb() we will have to > NAK the pa

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Alexander Duyck
On Tue, Mar 27, 2018 at 7:23 AM, Sinan Kaya wrote: > 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.

Aw: Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Lino Sanfilippo
> > 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

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
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?

Re: Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Lino Sanfilippo
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? > > Basically, wmb() should never be used before writel(

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
Jeff, On 3/23/2018 10:34 PM, ok...@codeaurora.org wrote: > On 2018-03-23 19:58, Jeff Kirsher wrote: >> On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: >>> On Fri, Mar 23, 2018 at 11:52 AM, Sinan Kaya >>> wrote: >>> > Code includes wmb() followed by writel() in multiple places. writel()

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread okaya
On 2018-03-23 19:58, Jeff Kirsher wrote: On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: On Fri, Mar 23, 2018 at 11:52 AM, Sinan Kaya wrote: > Code includes wmb() followed by writel() in multiple places. writel() > already has a barrier on some architectures like arm64. > > This ends

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread Jeff Kirsher
On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: > On Fri, Mar 23, 2018 at 11:52 AM, Sinan Kaya > wrote: > > Code includes wmb() followed by writel() in multiple places. writel() > > already has a barrier on some architectures like arm64. > > > > This ends up CPU observing two barriers b

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread Alexander Duyck
On Fri, Mar 23, 2018 at 11:52 AM, Sinan Kaya wrote: > Code includes wmb() followed by writel() in multiple places. writel() > already has a barrier on some architectures like arm64. > > This ends up CPU observing two barriers back to back before executing the > register write. > > Since code alrea

[PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread Sinan Kaya
Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_rela