[PATCH] nvme-fc: set max_segments to lldd max value

Sagi Grimberg sagi at grimberg.me
Mon Jul 20 15:56:42 EDT 2020


>> Currently the FC transport is set max_hw_sectors based on the lldds
>> max sgl segment count. However, the block queue max segments is
>> set based on the controller's max_segments count, which the transport
>> does not set.  As such, the lldd is receiving sgl lists that are
>> exceeding its max segment count.
>>
>> Set the controller max segment count and derive max_hw_sectors from
>> the max segment count.
>>
>> Signed-off-by: James Smart <jsmart2021 at gmail.com>
>> Reviewed-by: Ewan D. Milne <emilne at redhat.com>
>> CC: Max Gurtovoy <maxg at mellanox.com>
>>
>> ---
>> Looks like the setting of max_segments has been missing from all
>> fabric transports for a while. Rdma had a fixup (ff13c1b87c97) from
>> Max last fall that corrected this. But tcp and fc were still lacking.
>> Copying Max to look at tcp.
> 
> The TCP stack is not limiting the IO size, I guess because of the fact 
> it's a streaming protocol.
> 
> So I don't see a bug in the tcp driver but we can consider limiting the 
> IO size if it will improve performance in some cases.
> 
> BTW, AFAIK the iscsi TCP acts the same.
> 
> Sagi,
> 
> do you see some benefits we can get by limiting the mdts for tcp ?

Not really...



More information about the Linux-nvme mailing list