diff options
author | Parav Pandit <parav@mellanox.com> | 2018-08-27 08:44:14 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-08-30 16:31:50 -0400 |
commit | 66d0f207dbf0e983c8006eb2fc5060163646210f (patch) | |
tree | 9e0df1e6666c86e730e07d54c573d079860acaa9 /drivers/infiniband/sw/rxe/rxe_pool.h | |
parent | 3db2bceb29fd9a2f31d5df573f337dbba577f8e9 (diff) |
IB/rxe: Replace spinlock with rwlock
Concurrent readers which read rb tree are protected using read lock.
Concurrent writers which add element to pool are protected
using write lock.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_pool.h')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_pool.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.h b/drivers/infiniband/sw/rxe/rxe_pool.h index 47df28e43acf..6eb344236afc 100644 --- a/drivers/infiniband/sw/rxe/rxe_pool.h +++ b/drivers/infiniband/sw/rxe/rxe_pool.h @@ -90,7 +90,7 @@ struct rxe_pool_entry { struct rxe_pool { struct rxe_dev *rxe; - spinlock_t pool_lock; /* pool spinlock */ + rwlock_t pool_lock; /* protects pool add/del/search */ size_t elem_size; struct kref ref_cnt; void (*cleanup)(struct rxe_pool_entry *obj); |