RE: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-04 Thread Kalderon, Michal
gt; <ariel.el...@cavium.com>; Doug Ledford <dledf...@redhat.com>; Jason > > > Gunthorpe <j...@ziepe.ca>; linux-kernel@vger.kernel.org > > > Subject: Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers > > > on weakly-ordered archs #2 > > > > &g

RE: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-04 Thread Kalderon, Michal
> To: linux-r...@vger.kernel.org; ti...@codeaurora.org; > > > sulr...@codeaurora.org > > > Cc: linux-arm-...@vger.kernel.org; > > > linux-arm-ker...@lists.infradead.org; > > > Kalderon, Michal ; Elior, Ariel > > > ; Doug Ledford ; Jason > > > Gu

Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-03 Thread Jason Gunthorpe
vger.kernel.org; linux-arm-ker...@lists.infradead.org; > > Kalderon, Michal <michal.kalde...@cavium.com>; Elior, Ariel > > <ariel.el...@cavium.com>; Doug Ledford <dledf...@redhat.com>; Jason > > Gunthorpe <j...@ziepe.ca>; linux-kernel@vger.kernel.org

Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-03 Thread Jason Gunthorpe
vger.kernel.org; linux-arm-ker...@lists.infradead.org; > > Kalderon, Michal ; Elior, Ariel > > ; Doug Ledford ; Jason > > Gunthorpe ; linux-kernel@vger.kernel.org > > Subject: Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on > > weakly-ordered archs #2 >

Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-03 Thread Sinan Kaya
On 4/3/2018 3:42 AM, Kalderon, Michal wrote: > The wmb before writel are used to make sure the > HW observes the changes in memory before we trigger the doorbell. According to Linus, writel() guarantees observability. No extra barrier is necessary.

Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-03 Thread Sinan Kaya
On 4/3/2018 3:42 AM, Kalderon, Michal wrote: > The wmb before writel are used to make sure the > HW observes the changes in memory before we trigger the doorbell. According to Linus, writel() guarantees observability. No extra barrier is necessary.

RE: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-03 Thread Kalderon, Michal
l.kalde...@cavium.com>; Elior, Ariel > <ariel.el...@cavium.com>; Doug Ledford <dledf...@redhat.com>; Jason > Gunthorpe <j...@ziepe.ca>; linux-kernel@vger.kernel.org > Subject: Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on > weakly-ordered archs #2 >

RE: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-03 Thread Kalderon, Michal
l > ; Doug Ledford ; Jason > Gunthorpe ; linux-kernel@vger.kernel.org > Subject: Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on > weakly-ordered archs #2 > > On 3/22/2018 12:26 PM, Sinan Kaya wrote: > > @@ -860,7 +860,7 @@ static void doorbell_cq(struct qedr

Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-02 Thread Sinan Kaya
On 3/22/2018 12:26 PM, Sinan Kaya wrote: > @@ -860,7 +860,7 @@ static void doorbell_cq(struct qedr_cq *cq, u32 cons, u8 > flags) > wmb(); > cq->db.data.agg_flags = flags; > cq->db.data.value = cpu_to_le32(cons); > - writeq(cq->db.raw, cq->db_addr); > +

Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-04-02 Thread Sinan Kaya
On 3/22/2018 12:26 PM, Sinan Kaya wrote: > @@ -860,7 +860,7 @@ static void doorbell_cq(struct qedr_cq *cq, u32 cons, u8 > flags) > wmb(); > cq->db.data.agg_flags = flags; > cq->db.data.value = cpu_to_le32(cons); > - writeq(cq->db.raw, cq->db_addr); > +

[PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-03-22 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

[PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2

2018-03-22 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