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 <stefa...@redhat.com> > Signed-off-by: Connor Kuehl <cku...@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 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization