[PATCHv2] nvme: only use power of two io boundaries

Damien Le Moal Damien.LeMoal at wdc.com
Fri Aug 28 00:56:40 EDT 2020


On 2020/08/28 13:44, Keith Busch wrote:
> On Fri, Aug 28, 2020 at 04:30:02AM +0000, Damien Le Moal wrote:
>> On 2020/08/28 13:16, Keith Busch wrote:
>>> As long as zone sizes reuse the queue's chunk_sectors, the zone size
>>> needs to take precedence since it's more than just a hint compared to
>>> NOIOB. If people complain about the warning, that may indicate we ought
>>> to find a way to get around overloading the chunk_sectors queue limit,
>>> but I suspect ZNS drives won't report an iob value.
>>
>> Understood. But for ZNS, since the zone size would take precedence over iob for
>> chunk sectors, wouldn't it make sense to have the entire code block under a
>> if (!blk_queue_is_zoned(ns->queue)) ? Something like this:
>>
>> 	if (!blk_queue_is_zoned(ns->queue)) {
>> 		if (is_power_of_2(iob))
>> 			blk_queue_chunk_sectors(ns->queue, iob);
>> 		else if (iob && !(disk->flags & GENHD_FL_UP))
>> 			dev_warn(ctrl->device,
>> 				"namespace:%u has unused io boundary:%u\n",
>> 				ns->head->ns_id, iob);
>> 	}
> 
> Oh, I see. I think we should have the warning for ZNS too, though, just
> to get an indication that devices really want this kind of
> consideration.

I see. The use of chunk_sectors for both the zone size and iob renders iob
impossible to satisfy. So indeed it makes sense to get the warning. Thanks !

-- 
Damien Le Moal
Western Digital Research



More information about the Linux-nvme mailing list