[PATCH v2] nvmet-rdma: Avoid o(n^2) loop in delete_ctrl

Christoph Hellwig hch at lst.de
Tue May 7 00:26:26 PDT 2024


On Tue, May 07, 2024 at 09:54:44AM +0300, Sagi Grimberg wrote:
> From: Sagi Grimberg <sagi.grimberg at vastdata.com>
> 
> When deleting a nvmet-rdma ctrl, we essentially loop over all
> queues that belong to the controller and schedule a removal of
> each. Instead of restarting the loop every time a queue is found,
> do a simple safe list traversal.
> 
> This addresses an unneeded time spent scheduling queue removal in
> cases there a lot of queues.

Looks good:

Reviewed-by: Christoph Hellwig <hch at lst.de>

(crossing fingers we're not going to run into a mess due to
rdma_disconnect)




More information about the Linux-nvme mailing list