nvme-rdma: remove race conditions from IB signalling
authorMarta Rybczynska <mrybczyn@kalray.eu>
Tue, 6 Jun 2017 11:27:21 +0000 (13:27 +0200)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 6 Jul 2017 06:46:58 +0000 (09:46 +0300)
commit5e599d73c1c1816af07f94ddba879499aa39b43c
tree304e09cf02b4c5d96d40cc0989ba333537c2bf88
parente5859d3a0ea07bf948f4538d47fe6547f6e115be
nvme-rdma: remove race conditions from IB signalling

This patch improves the way the RDMA IB signalling is done by using atomic
operations for the signalling variable. This avoids race conditions on
sig_count.

The signalling interval changes slightly and is now the largest power of
two not larger than queue depth / 2.

ilog() usage idea by Bart Van Assche.

Signed-off-by: Marta Rybczynska <marta.rybczynska@kalray.eu>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
drivers/nvme/host/rdma.c