Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread kbuild test robot
Hi Sinan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc6 next-20180322] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/co

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Casey Leedom
Okay, thanks Sinan. I ~think~ we're on the same page here. Our guy Michael Werner is carefully going through our drivers with Steve Wise. I'd like to let them work on the changes with a lot of thought and testing before diving in too far. We had thought that we could get around the lack o

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
On 3/22/2018 4:45 PM, Casey Leedom wrote: > Yes, but ... > > For instance, I see that the x86 writel() has "memory" in its asm(), which > prevents GCC from reordering generated instructions. And it ~looks like~ > arm64 ~sort of~ gets that with the inclusion of __iowmb() (which translates > to wmb

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Jason Gunthorpe
On Thu, Mar 22, 2018 at 08:45:11PM +, Casey Leedom wrote: > I'm guessing~ that this line in the documentation ~may~ imply the GCC > ordering: > > ... Note that relaxed accesses to > the same peripheral are guaranteed to be ordered with respect to each > other. ... An arch can'

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Casey Leedom
Yes, but ... For instance, I see that the x86 writel() has "memory" in its asm(), which prevents GCC from reordering generated instructions. And it ~looks like~ arm64 ~sort of~ gets that with the inclusion of __iowmb() (which translates to wmb() then dsb(st) which finally holds the GCC "memory" b

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Jason Gunthorpe
On Thu, Mar 22, 2018 at 07:44:51PM +, Casey Leedom wrote: > | From: Steve Wise > | Sent: Thursday, March 22, 2018 9:28 AM > | > | | From: Sinan Kaya > | | Date: Thursday, March 22, 2018 7:52 AM > | | > | | Isn't this a PowerPC problem? Why penalize other architectures? > | > | I worry it bre

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Casey Leedom
| From: Steve Wise | Sent: Thursday, March 22, 2018 9:28 AM | | | From: Sinan Kaya | | Date: Thursday, March 22, 2018 7:52 AM | | | | Isn't this a PowerPC problem? Why penalize other architectures? | | I worry it breaks PPC. And all other architectures. Aparraently there isn't a formal API des

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
On 3/22/2018 1:48 PM, Jason Gunthorpe wrote: >> AFAIS, even writeq won't compile on this arch. I started questioning this >> build test. > I have the same confusion. Did you figure out an explanation? I did a compile test without the relaxed change. It built just fine. CONFIG_64BIT is also not def

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Jason Gunthorpe
On Thu, Mar 22, 2018 at 08:48:35AM -0400, ok...@codeaurora.org wrote: > On 2018-03-22 08:24, ok...@codeaurora.org wrote: > >On 2018-03-22 02:44, kbuild test robot wrote: > >>Hi Sinan, > >> > >>Thank you for the patch! Yet something to improve: > >> > >>[auto build test ERROR on linus/master] > >>[a

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Jason Gunthorpe
On Thu, Mar 22, 2018 at 10:28:13AM -0400, Sinan Kaya wrote: >On 03/22/2018 08:48 AM, [1]ok...@codeaurora.org wrote: > > Jason, > Can you remove the writeq change if it is too late for me to fix? > This is an infrastructural issue on xtensa arch. > Probably, it won't get fix

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Steve Wise
On 3/22/2018 9:52 AM, Sinan Kaya wrote: > On 3/22/2018 9:40 AM, Steve Wise wrote: >> I think all these iw_cxgb4 changes should be reverted until we really have a >> plan for multi-platform that works. > I know you are looking to have support for PowerPC. > > Isn't this a PowerPC problem? Why p

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
On 3/22/2018 9:40 AM, Steve Wise wrote: > I think all these iw_cxgb4 changes should be reverted until we really have a > plan for multi-platform that works. I know you are looking to have support for PowerPC. Isn't this a PowerPC problem? Why penalize other architectures? Do you see anything

RE: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Steve Wise
> > On 2018-03-22 08:24, ok...@codeaurora.org wrote: > > On 2018-03-22 02:44, kbuild test robot wrote: > >> Hi Sinan, > >> > >> Thank you for the patch! Yet something to improve: > >> > >> [auto build test ERROR on linus/master] > >> [also build test ERROR on v4.16-rc6 next-20180321] > >> [if your

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
One more time hopefully without HTML this time. On 03/22/2018 08:48 AM, ok...@codeaurora.org wrote: Can you remove the writeq change if it is too late for me to fix? This is an infrastructural issue on xtensa arch. Probably, it won't get fixed today. AFAIS, even writeq won't compile on this

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread okaya
On 2018-03-22 08:24, ok...@codeaurora.org wrote: On 2018-03-22 02:44, kbuild test robot wrote: Hi Sinan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc6 next-20180321] [if your patch is applied to the wrong git tree

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread okaya
On 2018-03-22 02:44, kbuild test robot wrote: Hi Sinan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc6 next-20180321] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-21 Thread kbuild test robot
Hi Sinan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc6 next-20180321] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/co

RE: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-20 Thread Steve Wise
> > On Mon, Mar 19, 2018 at 10:47:46PM -0400, Sinan Kaya wrote: > > > Code includes wmb() followed by writel(). 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. >

RE: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-20 Thread Steve Wise
> On Mon, Mar 19, 2018 at 10:47:46PM -0400, Sinan Kaya wrote: > > Code includes wmb() followed by writel(). 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

Re: [PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-20 Thread Jason Gunthorpe
On Mon, Mar 19, 2018 at 10:47:46PM -0400, Sinan Kaya wrote: > Code includes wmb() followed by writel(). 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

[PATCH v4 4/6] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-19 Thread Sinan Kaya
Code includes wmb() followed by writel(). 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_relaxed(). Signed-off-