don't reorder requests passed to ->queue_rqs
Jens Axboe
axboe at kernel.dk
Wed Nov 13 10:39:52 PST 2024
On 11/13/24 11:33 AM, Bart Van Assche wrote:
>
> On 11/13/24 7:20 AM, Christoph Hellwig wrote:
>> currently blk-mq reorders requests when adding them to the plug because
>> the request list can't do efficient tail appends. When the plug is
>> directly issued using ->queue_rqs that means reordered requests are
>> passed to the driver, which can lead to very bad I/O patterns when
>> not corrected, especially on rotational devices (e.g. NVMe HDD) or
>> when using zone append.
>>
>> This series first adds two easily backportable workarounds to reverse
>> the reording in the virtio_blk and nvme-pci ->queue_rq implementations
>> similar to what the non-queue_rqs path does, and then adds a rq_list
>> type that allows for efficient tail insertions and uses that to fix
>> the reordering for real and then does the same for I/O completions as
>> well.
>
> Hi Christoph,
>
> Could something like the patch below replace this patch series? I
> don't have a strong opinion about which approach to select.
I mean it obviously could, but it'd be a terrible way to go as we're now
iterating the full list just to reverse it...
--
Jens Axboe
More information about the Linux-nvme
mailing list