mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Eugenio Pérez" <eperezma@redhat.com>
To: linux-kernel@vger.kernel.org, mst@redhat.com,
	Hanna Reitz <hreitz@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Jason Wang <jasowang@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	German Maglione <gmaglione@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	virtualization@lists.linux.dev
Subject: [RFC 0/5] virtiofs: map buffer out of virtqueue lock
Date: Wed, 22 Jan 2025 17:31:49 +0100	[thread overview]
Message-ID: <20250122163154.1225353-1-eperezma@redhat.com> (raw)

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 this patch, fio read test goes from 1201MiB/s to
1211MiB/s.

---
Sending this series to obtain feedback if this is the right way to go.

Q: Do we need virtqueue_map_sgs? XDP directly call dma_map. Need to
profile.
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 (4):
  vduse: add virtio_fs to allowed dev id
  virtiofs: Move stack sg to fuse_req
  virtio_ring: add virtqueue premapped out/in buffers support
  virtiofs: perform DMA operations out of the spinlock

Jason Wang (1):
  virtio_ring: introduce virtqueue_map/unmap_sgs()

 drivers/vdpa/vdpa_user/vduse_dev.c |   1 +
 drivers/virtio/virtio_ring.c       | 165 ++++++++++++++++++++++++++---
 fs/fuse/fuse_i.h                   |   7 ++
 fs/fuse/virtio_fs.c                |  68 +++++++-----
 include/linux/virtio.h             |  17 +++
 5 files changed, 220 insertions(+), 38 deletions(-)

-- 
2.48.1


             reply	other threads:[~2025-01-22 16:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 16:31 Eugenio Pérez [this message]
2025-01-22 16:31 ` [RFC 1/5] vduse: add virtio_fs to allowed dev id Eugenio Pérez
2025-01-23  1:48   ` Jason Wang
2025-01-22 16:31 ` [RFC 2/5] virtio_ring: introduce virtqueue_map/unmap_sgs() Eugenio Pérez
2025-01-23  1:51   ` Jason Wang
2025-01-23  7:31     ` Eugenio Perez Martin
2025-01-24  1:03       ` Jason Wang
2025-01-22 16:31 ` [RFC 3/5] virtiofs: Move stack sg to fuse_req Eugenio Pérez
2025-01-23  1:54   ` Jason Wang
2025-01-23  7:33     ` Eugenio Perez Martin
2025-01-22 16:31 ` [RFC 4/5] virtio_ring: add virtqueue premapped out/in buffers support Eugenio Pérez
2025-01-22 16:31 ` [RFC 5/5] virtiofs: perform DMA operations out of the spinlock Eugenio Pérez
2025-01-23  1:56   ` Jason Wang
2025-01-23  2:26     ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250122163154.1225353-1-eperezma@redhat.com \
    --to=eperezma@redhat.com \
    --cc=gmaglione@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=vgoyal@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®