[Virtio-fs] [PATCH] virtiofs: Enable multiple request queues
Connor Kuehl
ckuehl at redhat.com
Sat May 8 12:22:32 UTC 2021
On 5/7/21 5:15 PM, Connor Kuehl wrote:
> Distribute requests across the multiqueue complex automatically based
> on the IRQ affinity.
>
> Suggested-by: Stefan Hajnoczi <stefanha at redhat.com>
> Signed-off-by: Connor Kuehl <ckuehl at redhat.com>
> ---
> fs/fuse/virtio_fs.c | 30 ++++++++++++++++++++++++------
> 1 file changed, 24 insertions(+), 6 deletions(-)
>
> diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
> index bcb8a02e2d8b..dcdc8b7b1ad5 100644
> --- a/fs/fuse/virtio_fs.c
> +++ b/fs/fuse/virtio_fs.c
> @@ -30,6 +30,10 @@
> static DEFINE_MUTEX(virtio_fs_mutex);
> static LIST_HEAD(virtio_fs_instances);
>
> +struct virtio_fs_vq;
> +
> +DEFINE_PER_CPU(struct virtio_fs_vq *, this_cpu_fsvq);
> [..]
> +
> + for_each_cpu(cpu, mask) {
> + struct virtio_fs_vq **cpu_vq = per_cpu_ptr(&this_cpu_fsvq, cpu);
> + *cpu_vq = &fs->vqs[i];
> + }
> + }
Hmm, actually, it's just occurred to me that the per-CPU state could be
problematic with multiple virtio-fs mounts.
I'll workshop this some more.
Connor
More information about the Virtio-fs
mailing list