diff options
author | 2020-03-10 10:22:36 +0200 | |
---|---|---|
committer | 2020-03-13 11:08:02 -0300 | |
commit | b9358bdbc713cb64b8701bcbd450edc155d761a1 (patch) | |
tree | cdb14497a0fed7d6d9121dbcaedb5bd6e38f47ed /tools/perf/scripts/python/export-to-postgresql.py | |
parent | RDMA/mlx5: Lock access to ent->available_mrs/limit when doing queue_work (diff) | |
download | wireguard-linux-b9358bdbc713cb64b8701bcbd450edc155d761a1.tar.xz wireguard-linux-b9358bdbc713cb64b8701bcbd450edc155d761a1.zip |
RDMA/mlx5: Fix locking in MR cache work queue
All of the members of mlx5_cache_ent must be accessed while holding the
spinlock, add the missing spinlock in the __cache_work_func().
Using cache->stopped and flush_workqueue() is an inherently racy way to
shutdown self-scheduling work on a queue. Replace it with ent->disabled
under lock, and always check disabled before queuing any new work. Use
cancel_work_sync() to shutdown the queue.
Use READ_ONCE/WRITE_ONCE for dev->last_add to manage concurrency as
coherency is less important here.
Split fill_delay from the bitfield. C bitfield updates are not atomic and
this is just a mess. Use READ_ONCE/WRITE_ONCE, but this could also use
test_bit()/set_bit().
Link: https://lore.kernel.org/r/20200310082238.239865-11-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions