diff options
author | Sebastian Sanchez <sebastian.sanchez@intel.com> | 2016-12-08 04:32:28 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-11 21:25:13 +0100 |
commit | 53e91d264be9e9adbf34b83b8ce5c12452f6765e (patch) | |
tree | 12d98b46ba45608e459942d7df6372d0fecb7ab1 /drivers/infiniband/hw/hfi1/rc.c | |
parent | IB/hfi1: Fix dc8051 multiple qword memory reads (diff) | |
download | linux-53e91d264be9e9adbf34b83b8ce5c12452f6765e.tar.xz linux-53e91d264be9e9adbf34b83b8ce5c12452f6765e.zip |
IB/hfi1: Use non-atomic __test_and_clear_bit in hot path
qp->r_aflags is already protected by qp->r_lock, therefore,
test_and_clear_bit() doesn't need to be atomic. Profile
shows this function call is costly.
Change the test_and_clear_bit() call to use the non-atomic
variant.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/rc.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/rc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c index 8bc5013f39a1..aaca8588e199 100644 --- a/drivers/infiniband/hw/hfi1/rc.c +++ b/drivers/infiniband/hw/hfi1/rc.c @@ -2295,7 +2295,7 @@ send_last: hfi1_copy_sge(&qp->r_sge, data, tlen, 1, copy_last); rvt_put_ss(&qp->r_sge); qp->r_msn++; - if (!test_and_clear_bit(RVT_R_WRID_VALID, &qp->r_aflags)) + if (!__test_and_clear_bit(RVT_R_WRID_VALID, &qp->r_aflags)) break; wc.wr_id = qp->r_wr_id; wc.status = IB_WC_SUCCESS; |