virtio-fs: improved request latencies when Virtio queue is full
authorPeter-Jan Gootzen <pgootzen@nvidia.com>
Fri, 17 May 2024 19:04:35 +0000 (21:04 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Jul 2024 12:42:42 +0000 (08:42 -0400)
commit106e4df1206b2c239ba13a9ec2fd1e9b754bd455
tree9200fbcdc68b3cbf08d53284a8241221c888e4c8
parent2106e1f444d9d79f5c3784e5847bfdb6cc3ca69f
virtio-fs: improved request latencies when Virtio queue is full

Currently, when the Virtio queue is full, a work item is scheduled
to execute in 1ms that retries adding the request to the queue.
This is a large amount of time on the scale on which a
virtio-fs device can operate. When using a DPU this is around
30-40us baseline without going to a remote server (4k, QD=1).

This patch changes the retrying behavior to immediately filling the
Virtio queue up again when a completion has been received.

This reduces the 99.9th percentile latencies in our tests by
60x and slightly increases the overall throughput, when using a
workload IO depth 2x the size of the Virtio queue and a
DPU-powered virtio-fs device (NVIDIA BlueField DPU).

Signed-off-by: Peter-Jan Gootzen <pgootzen@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Yoray Zack <yorayz@nvidia.com>
Message-Id: <20240517190435.152096-3-pgootzen@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
fs/fuse/virtio_fs.c