Skip to content

RFC virtiofs: map buffer out of virtqueue lock

Eugenio Pérez lkml virtualization 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest5 patches 6 repliesIn review
  2. v1 RFC5 patches 8 repliesSuperseded

Changes in v2 from the cover letter

* Follow current add_premapped virtio API
* Disable notification more aggressive too.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5vduse: add virtio_fs to allowed dev iddrivers/vdpa/vdpa_user/vduse_dev.c+1 -02 replies
2/5virtiofs: Move stack sg to fuse_reqfs/fuse/fuse_i.h fs/fuse/virtio_fs.c+28 -240 replies
3/5virtio_ring: add api for premapped out and in buffer chaindrivers/virtio/virtio_ring.c include/linux/virtio.h+42 -00 replies
4/5virtiofs: perform DMA operations out of the spinlockfs/fuse/virtio_fs.c+38 -21 reply
5/5virtiofs: Disable notifications more aggresivelyfs/fuse/virtio_fs.c+2 -03 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchJason Wang
1/5A-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [RFC v2 0/5] virtiofs: map buffer out of virtqueue lock

This is useful for some setups like swiotlb or VDUSE where the DMA operations are expensive and/or need to be performed with a write lock.

After applying these patches, fio read test goes from 1124MiB/s to 1263.14MiB/s.

v2:
* Follow current add_premapped virtio API
* Disable notification more aggressive too.

---
Sending this series to obtain feedback if this is the right way to go & to profile it properly.

TODO: Profile multiqueue.
TODO: Handling errors.
TODO: Do the same for hiprio queue.
TODO: Can we batch maps? virtiofs always sends many buffers.

Eugenio Pérez (5):
vduse: add virtio_fs to allowed dev id
virtiofs: Move stack sg to fuse_req
virtio_ring: add api for premapped out and in buffer chain
virtiofs: perform DMA operations out of the spinlock
virtiofs: Disable notifications more aggresively

 drivers/vdpa/vdpa_user/vduse_dev.c |  1 +
 drivers/virtio/virtio_ring.c       | 35 ++++++++++++
 fs/fuse/fuse_i.h                   |  7 +++
 fs/fuse/virtio_fs.c                | 85 +++++++++++++++++++++---------
 include/linux/virtio.h             |  7 +++
 5 files changed, 110 insertions(+), 25 deletions(-)
Signature · 1 line
2.48.1