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

Keith Busch kbusch at kernel.org
Tue May 7 08:08:25 PDT 2024


On Tue, May 07, 2024 at 09:26:26AM +0200, Christoph Hellwig wrote:
> 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)

Sounds like nvme-6.10 material then. Applied to that tree.



More information about the Linux-nvme mailing list