[PATCH] nvmet-rdma: Release connections synchronously

Bart Van Assche bvanassche at acm.org
Thu May 18 13:32:44 PDT 2023


On 5/17/23 00:42, Sagi Grimberg wrote:
> On 5/11/23 18:03, Bart Van Assche wrote:
>> @@ -1582,11 +1566,6 @@ static int nvmet_rdma_queue_connect(struct 
>> rdma_cm_id *cm_id,
>>           goto put_device;
>>       }
>> -    if (queue->host_qid == 0) {
>> -        /* Let inflight controller teardown complete */
>> -        flush_workqueue(nvmet_wq);
>> -    }
>> -
>>       ret = nvmet_rdma_cm_accept(cm_id, queue, &event->param.conn);
>>       if (ret) {
>>           /*
> 
> You could have simply removed this hunk alone to make lockdep quiet on
> this, without the need to rework the async queue removal.
> 
> The flush here was added to prevent a reset/connect/disconnect storm
> causing the target to run out of resources (which we have seen reports
> about in the distant past). What prevents it now?
> 
> And you both reworked the teardown, and still removed the flush, I don't
> get why both are needed.

Hi Sagi,

My understanding is that the above flush_workqueue() call waits for 
prior release_work to complete. If the release_work instance is removed, 
I don't think that the above flush_workqueue() call is still necessary.

This patch prevents that the target runs out of resources by releasing 
connections synchronously instead of asynchronously.

Does the above answer your questions?

Bart.



More information about the Linux-nvme mailing list