[PATCH v2] nvme-tcp: send quota for nvme_tcp_send_all()

Sagi Grimberg sagi at grimberg.me
Tue Oct 25 06:46:07 PDT 2022


>>> Add a send quota in nvme_tcp_send_all() to avoid stalls when sending
>>> large amounts of requests.
>>>
>>> Cc: Hannes Reinecke <hare at suse.de>
>>> Signed-off-by: Daniel Wagner <dwagner at suse.de>
>>> ---
>>>
>>> IMO, this patch might still be a good idea to add. At least in my test
>>> setup where I only have one ethernet port it makes a big difference
>>> when accessing the system via ssh. When nvme-tcp is pushing a lot of
>>> data via the network, the ssh session is completely blocked by the
>>> storage traffic. With it, the ssh session stays responsive. >
>>
>> I'm not sure whether it is possible but is there a way to gather
>> some form of quantitative data and present it here to we all know
>> exactly which aspect is improving by this patch in context of
>> "ssd session is completely blocked" ?
>>
> Doubt that we can do it. Point is, the send code will run in a tight 
> loop, making scheduling of other processes / packets really hard.
> So if you have several processes on the same interface (as here with the 
> ssh connection) nvme-tcp will eat up the entire bandwidth sending its 
> data, and everyone else on the line will suffer.
> 
> I guess the same effect could be had by adding a 'schedule()' after each 
> nvme_tcp_try_send() call.

Daniel, does adding cond_resched() make the system responsive again?



More information about the Linux-nvme mailing list