[PATCH] nvme: zns: limit max_zone_append by max_segments

Damien Le Moal dlemoal at kernel.org
Mon Jul 31 07:07:30 PDT 2023


On 7/31/23 23:05, Christoph Hellwig wrote:
> On Mon, Jul 31, 2023 at 11:02:35PM +0900, Damien Le Moal wrote:
>>>
>>> 	blk_queue_max_zone_append_sectors(q,
>>> 		queue_max_sectors(q), ns->ctrl->max_zone_append);
>>
>> blk_queue_max_zone_append_sectors() already does cap max zone append to
>> max_hw_sectors.
> 
> Then we should not need this..

The cap is not the soft limit. It is the large hw limit, which I think is mdts
as well for zns.

> 
>> We could also add the cap to queue_max_segments(q) <<
>> PAGE_SECTORS_SHIFT in that function as well given that all zoned devices should
>> have that anyway...
> 
> No.  That's a NVMe specific thing.  Most SCSI HBAs don't have this
> issue.  NVMe devices supporting SGLs don't really have it either, but
> for that we'd need to commit to always using SGLs for non-tiny I/O,
> which we should probably be doing.

-- 
Damien Le Moal
Western Digital Research




More information about the Linux-nvme mailing list