Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-24 Thread Sinan Kaya
t;> linux-arm-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; Elior, >> Ariel ; Dept-Eng Everest Linux L2 > engeverestlinu...@cavium.com>; linux-ker...@vger.kernel.org >> Subject: Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly- >> ordered ar

RE: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-24 Thread Chopra, Manish
fradead.org; Elior, > Ariel ; Dept-Eng Everest Linux L2 engeverestlinu...@cavium.com>; linux-ker...@vger.kernel.org > Subject: Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly- > ordered archs > > On 3/23/2018 1:04 PM, David Miller wrote: > > From: Sinan Kaya

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread David Miller
From: Sinan Kaya Date: Fri, 23 Mar 2018 13:13:46 -0400 > We have decided to drop a similar patch on Infiniband due to incorrect > usage of barrier(). If you feel strongly about it, I can remove the > DOORBELL change. Either remove the DOORBELL change or properly adjust the barrier() to be a wmb(

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread Sinan Kaya
On 3/23/2018 1:04 PM, David Miller wrote: > From: Sinan Kaya > Date: Fri, 23 Mar 2018 12:51:47 -0400 > >> It could if txdata->tx_db was not a union. There is a data dependency >> between txdata->tx_db.data.prod and txdata->tx_db.raw. >> >> So, no reordering. > > I don't see it that way, the cod

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread David Miller
From: Sinan Kaya Date: Fri, 23 Mar 2018 12:51:47 -0400 > It could if txdata->tx_db was not a union. There is a data dependency > between txdata->tx_db.data.prod and txdata->tx_db.raw. > > So, no reordering. I don't see it that way, the code requires that: txdata->tx_db.data.prod += nb

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread Sinan Kaya
On 3/23/2018 12:43 PM, David Miller wrote: > From: Sinan Kaya > Date: Fri, 23 Mar 2018 12:31:12 -0400 > >> Sorry, you got me confused now. >> >> If you look at the code closer, you'll see this. >> >> wmb(); >> >> txdata->tx_db.data.prod += nbd; >> barrier(); >> >> DOORBELL(bp,

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread David Miller
From: Sinan Kaya Date: Fri, 23 Mar 2018 12:31:12 -0400 > Sorry, you got me confused now. > > If you look at the code closer, you'll see this. > > wmb(); > > txdata->tx_db.data.prod += nbd; > barrier(); > > DOORBELL(bp, txdata->cid, txdata->tx_db.raw); > > and you also

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread Sinan Kaya
On 3/23/2018 12:20 PM, David Miller wrote: > From: Sinan Kaya > Date: Thu, 22 Mar 2018 13:10:00 -0400 > >> Code includes wmb() followed by writel(). writel() already has a >> barrier on some architectures like arm64. > ... >> @@ -4155,7 +4155,7 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-23 Thread David Miller
From: Sinan Kaya Date: Thu, 22 Mar 2018 13:10:00 -0400 > Code includes wmb() followed by writel(). writel() already has a > barrier on some architectures like arm64. ... > @@ -4155,7 +4155,7 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, > struct net_device *dev) > txdata->tx_db.dat