OSDN Git Service

nvmet-rdma: use SRQ per completion vector
authorMax Gurtovoy <maxg@mellanox.com>
Wed, 19 Apr 2017 08:56:57 +0000 (11:56 +0300)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 22:18:35 +0000 (16:18 -0600)
commitb0012dd397155438c61b0c1b52ceec1f1366b3cc
tree4720ca5a6fee9682b80dc72cbcd415cc1637584f
parent03f8cebc127fa285874074ec314b76b1333f6c43
nvmet-rdma: use SRQ per completion vector

In order to save resource allocation and utilize the completion
locality in a better way (compared to SRQ per device that exist today),
allocate Shared Receive Queues (SRQs) per completion vector. Associate
each created QP/CQ with an appropriate SRQ according to the queue index.
This association will reduce the lock contention in the fast path
(compared to SRQ per device solution) and increase the locality in
memory buffers. Add new module parameter for SRQ size to adjust it
according to the expected load. User should make sure the size is >= 256
to avoid lack of resources. Also reduce the debug level of "last WQE
reached" event that is raised when a QP is using SRQ during destruction
process to relief the log.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/rdma.c