* [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs
[not found] <1520997629-17361-1-git-send-email-okaya@codeaurora.org>
@ 2018-03-14 3:20 ` Sinan Kaya
2018-03-14 4:12 ` Jason Gunthorpe
2018-03-15 22:23 ` Jason Gunthorpe
0 siblings, 2 replies; 4+ messages in thread
From: Sinan Kaya @ 2018-03-14 3:20 UTC (permalink / raw)
To: netdev, timur, sulrich
Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Michal Kalderon,
Ariel Elior, Doug Ledford, Jason Gunthorpe, linux-rdma,
linux-kernel
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_relaxed().
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/infiniband/hw/qedr/verbs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 53f00db..ccd55f4 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -1870,7 +1870,7 @@ static int qedr_update_qp_state(struct qedr_dev *dev,
if (rdma_protocol_roce(&dev->ibdev, 1)) {
wmb();
- writel(qp->rq.db_data.raw, qp->rq.db);
+ writel_relaxed(qp->rq.db_data.raw, qp->rq.db);
/* Make sure write takes effect */
mmiowb();
}
@@ -3247,7 +3247,7 @@ int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
* redundant doorbell.
*/
wmb();
- writel(qp->sq.db_data.raw, qp->sq.db);
+ writel_relaxed(qp->sq.db_data.raw, qp->sq.db);
/* Make sure write sticks */
mmiowb();
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs
2018-03-14 3:20 ` [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs Sinan Kaya
@ 2018-03-14 4:12 ` Jason Gunthorpe
2018-03-14 12:06 ` okaya
2018-03-15 22:23 ` Jason Gunthorpe
1 sibling, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2018-03-14 4:12 UTC (permalink / raw)
To: Sinan Kaya
Cc: netdev, timur, sulrich, linux-arm-msm, linux-arm-kernel,
Michal Kalderon, Ariel Elior, Doug Ledford, linux-rdma,
linux-kernel
On Tue, Mar 13, 2018 at 11:20:24PM -0400, 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 already has an explicit barrier call, changing writel() to
> writel_relaxed().
>
> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
> drivers/infiniband/hw/qedr/verbs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Sure matches my understanding of writel_relaxed
This is part of a series, should we take just this patch through the
rdma tree? If not:
Acked-by: Jason Gunthorpe <jgg@mellanox.com>
Thanks,
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs
2018-03-14 4:12 ` Jason Gunthorpe
@ 2018-03-14 12:06 ` okaya
0 siblings, 0 replies; 4+ messages in thread
From: okaya @ 2018-03-14 12:06 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: netdev, timur, sulrich, linux-arm-msm, linux-arm-kernel,
Michal Kalderon, Ariel Elior, Doug Ledford, linux-rdma,
linux-kernel
On 2018-03-14 00:12, Jason Gunthorpe wrote:
> On Tue, Mar 13, 2018 at 11:20:24PM -0400, 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 already has an explicit barrier call, changing writel() to
>> writel_relaxed().
>>
>> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
>> drivers/infiniband/hw/qedr/verbs.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Sure matches my understanding of writel_relaxed
>
> This is part of a series, should we take just this patch through the
> rdma tree? If not:
>
> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
Feel free to take pieces.
>
> Thanks,
> Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs
2018-03-14 3:20 ` [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs Sinan Kaya
2018-03-14 4:12 ` Jason Gunthorpe
@ 2018-03-15 22:23 ` Jason Gunthorpe
1 sibling, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2018-03-15 22:23 UTC (permalink / raw)
To: Sinan Kaya
Cc: netdev, timur, sulrich, linux-arm-msm, linux-arm-kernel,
Michal Kalderon, Ariel Elior, Doug Ledford, linux-rdma,
linux-kernel
On Tue, Mar 13, 2018 at 11:20:24PM -0400, 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 already has an explicit barrier call, changing writel() to
> writel_relaxed().
>
> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
> drivers/infiniband/hw/qedr/verbs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to RDMA for-next
Thanks,
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-15 22:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1520997629-17361-1-git-send-email-okaya@codeaurora.org>
2018-03-14 3:20 ` [PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs Sinan Kaya
2018-03-14 4:12 ` Jason Gunthorpe
2018-03-14 12:06 ` okaya
2018-03-15 22:23 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).