[Report] requests are submitted to hardware in reverse order from nvme/virtio-blk queue_rqs()
Damien Le Moal
dlemoal at kernel.org
Wed Jan 24 14:32:37 PST 2024
On 1/25/24 00:41, Keith Busch wrote:
> On Wed, Jan 24, 2024 at 07:59:54PM +0800, Ming Lei wrote:
>> Requests are added to plug list in reverse order, and both virtio-blk
>> and nvme retrieves request from plug list in order, so finally requests
>> are submitted to hardware in reverse order via nvme_queue_rqs() or
>> virtio_queue_rqs, see:
>>
>> io_uring submit_bio vdb 6302096 4096
>> io_uring submit_bio vdb 12235072 4096
>> io_uring submit_bio vdb 7682280 4096
>> io_uring submit_bio vdb 11912464 4096
>> io_uring virtio_queue_rqs vdb 11912464 4096
>> io_uring virtio_queue_rqs vdb 7682280 4096
>> io_uring virtio_queue_rqs vdb 12235072 4096
>> io_uring virtio_queue_rqs vdb 6302096 4096
>>
>>
>> May this reorder be one problem for virtio-blk and nvme-pci?
>
> For nvme, it depends. Usually it's probably not a problem, though some
> pci ssd's have optimizations for sequential IO that might not work if
> these get reordered.
ZNS and zoned virtio-blk drives... Cannot use io_uring at the moment. But I do
not thing we reliably can anyway, unless the issuer is CPU/ring aware and always
issue writes to a zone using the same ring.
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list