[PATCH] nvme-tcp: wait socket wmem to drain in queue stop
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Apr 8 14:00:00 PDT 2025
On 4/4/25 22:48, Michael Liang wrote:
> +static void nvme_tcp_stop_queue_wait(struct nvme_tcp_queue *queue)
> +{
> + int timeout = 100;
> +
is there a guarantee that above will work for all the setups?
using configurable timeout values helps creating more generic
fix, do we need to consider that here ?
> + while (timeout > 0) {
> + if (!sk_wmem_alloc_get(queue->sock->sk))
> + return;
> + msleep(2);
> + timeout -= 2;
> + }
> + dev_warn(queue->ctrl->ctrl.device,
> + "qid %d: wait draining sock wmem allocation timeout\n",
> + nvme_tcp_queue_id(queue));
> +}
> +
-ck
More information about the Linux-nvme
mailing list