linux/fs/fuse
Peter-Jan Gootzen 529395d2ae virtio-fs: add multi-queue support
This commit creates a multi-queue mapping at device bring-up.
The driver first attempts to use the existing MSI-X interrupt
affinities (previously disabled), and if not present, will distribute
the request queues evenly over the CPUs.
If the latter fails as well, all CPUs are mapped to request queue zero.

When a request is handed from FUSE to the virtio-fs device driver, the
driver will use the current CPU to index into the multi-queue mapping
and determine the optimal request queue to use.

We measured the performance of this patch with the fio benchmarking
tool, increasing the number of queues results in a significant speedup
for both read and write operations, demonstrating the effectiveness
of multi-queue support.

Host:
  - Dell PowerEdge R760
  - CPU: Intel(R) Xeon(R) Gold 6438M, 128 cores
  - VM: KVM with 32 cores
Virtio-fs device:
  - BlueField-3 DPU
  - CPU: ARM Cortex-A78AE, 16 cores
  - One thread per queue, each busy polling on one request queue
  - Each queue is 1024 descriptors deep
Workload:
  - fio, sequential read or write, ioengine=libaio, numjobs=32,
    4GiB file per job, iodepth=8, bs=256KiB, runtime=30s
Performance Results:
+===========================+==========+===========+
|     Number of queues      | Fio read | Fio write |
+===========================+==========+===========+
| 1 request queue (GiB/s)   | 6.1     | 4.6        |
+---------------------------+----------+-----------+
| 8 request queues (GiB/s)  | 25.8    | 10.3       |
+---------------------------+----------+-----------+
| 16 request queues (GiB/s) | 30.9    | 19.5       |
+---------------------------+----------+-----------+
| 32 request queue (GiB/s)  | 33.2    | 22.6       |
+---------------------------+----------+-----------+
| Speedup                   | 5.5x    | 5x         |
+---------------=-----------+----------+-----------+

Signed-off-by: Peter-Jan Gootzen <pgootzen@nvidia.com>
Signed-off-by: Yoray Zack <yorayz@nvidia.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2024-05-10 13:38:14 +02:00
..
acl.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
control.c fuse: remove unneeded lock which protecting update of congestion_threshold 2024-03-06 11:07:51 +01:00
cuse.c cuse: add kernel-doc comments to cuse_process_init_reply() 2024-04-15 11:02:10 +02:00
dax.c fuse: dax: set fc->dax to NULL in fuse_dax_conn_free() 2023-12-04 10:16:53 +01:00
dev.c fuse: clear FR_SENT when re-adding requests into pending list 2024-05-10 11:10:39 +02:00
dir.c fuse: fix leaked ENOSYS error on first statx call 2024-04-15 10:12:44 +02:00
file.c fuse: Convert fuse_readpages_end() to use folio_end_read() 2024-05-08 09:31:21 +02:00
fuse_i.h fuse: fix wrong ff->iomode state changes from parallel dio write 2024-04-15 10:12:03 +02:00
inode.c fuse: fix wrong ff->iomode state changes from parallel dio write 2024-04-15 10:12:03 +02:00
ioctl.c fuse: Add initial support for fs-verity 2024-05-08 09:31:21 +02:00
iomode.c fuse: fix parallel dio write on file open in passthrough mode 2024-04-15 10:12:44 +02:00
Kconfig fuse: introduce FUSE_PASSTHROUGH capability 2024-02-23 17:36:32 +01:00
Makefile fuse: introduce FUSE_PASSTHROUGH capability 2024-02-23 17:36:32 +01:00
passthrough.c fuse: verify zero padding in fuse_backing_map 2024-04-22 17:13:43 +02:00
readdir.c fuse: get rid of ff->readdir.lock 2024-03-06 16:20:58 +01:00
virtio_fs.c virtio-fs: add multi-queue support 2024-05-10 13:38:14 +02:00
xattr.c fuse: move fuse_xattr_handlers to .rodata 2023-10-09 16:24:18 +02:00