All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: linux-kernel@vger.kernel.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	virtualization@lists.linux-foundation.org
Subject: [RFC PATCH 00/16] virtio_ring: resize support re-use the old buffers
Date: Sun, 24 Apr 2022 10:40:28 +0800	[thread overview]
Message-ID: <20220424024044.94749-1-xuanzhuo@linux.alibaba.com> (raw)

This patch set is based on "virtio pci support VIRTIO_F_RING_RESET". This patch
set is rfc since it hasn't been merged yet. And "virtio pci support
VIRTIO_F_RING_RESET" is currently waiting for Jason Wang's "rework on the IRQ
hardening of virtio".

This patch set implements the reuse of buffers committed before resize.
And it is resubmitted to the new vq in the order of the original submission.

A core idea is to detach the original vring after the new vring is allocated.
Then, the buffers are sequentially obtained from the old vring and submitted to
the new vq.

Please review.

Xuan Zhuo (16):
  virtio_ring: split: vring_unmap_one_split() get extra by arg
  virtio_ring: split: introduce vring_virtqueue_detach_split()
  virtio_ring: split: extract virtqueue_update_split()
  virtio_ring: split: extract detach_from_vring_split()
  virtio_ring: split: support copy from vring
  virtio_ring: split: introduce vring_reuse_bufs_split()
  virtio_ring: split: resize support re-use buffers
  virtio_ring: packed: extract next_idx()
  virtio_ring: packed: always update desc_extra
  virtio_ring: packed: introduce vring_virtqueue_detach_packed()
  virtio_ring: packed: extract virtqueue_update_packed()
  virtio_ring: packed: extract detach_from_vring_packed()
  virtio_ring: packed: support copy from vring
  virtio_ring: packed: introduce vring_reuse_bufs_packed()
  virtio_ring: packed: resize support re-use buffers
  virtio_ring: virtqueue_resize() no longer call recycle() directly

 drivers/virtio/virtio_ring.c | 685 ++++++++++++++++++++++++++---------
 1 file changed, 518 insertions(+), 167 deletions(-)

--
2.31.0


WARNING: multiple messages have this Message-ID (diff)
From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: [RFC PATCH 00/16] virtio_ring: resize support re-use the old buffers
Date: Sun, 24 Apr 2022 10:40:28 +0800	[thread overview]
Message-ID: <20220424024044.94749-1-xuanzhuo@linux.alibaba.com> (raw)

This patch set is based on "virtio pci support VIRTIO_F_RING_RESET". This patch
set is rfc since it hasn't been merged yet. And "virtio pci support
VIRTIO_F_RING_RESET" is currently waiting for Jason Wang's "rework on the IRQ
hardening of virtio".

This patch set implements the reuse of buffers committed before resize.
And it is resubmitted to the new vq in the order of the original submission.

A core idea is to detach the original vring after the new vring is allocated.
Then, the buffers are sequentially obtained from the old vring and submitted to
the new vq.

Please review.

Xuan Zhuo (16):
  virtio_ring: split: vring_unmap_one_split() get extra by arg
  virtio_ring: split: introduce vring_virtqueue_detach_split()
  virtio_ring: split: extract virtqueue_update_split()
  virtio_ring: split: extract detach_from_vring_split()
  virtio_ring: split: support copy from vring
  virtio_ring: split: introduce vring_reuse_bufs_split()
  virtio_ring: split: resize support re-use buffers
  virtio_ring: packed: extract next_idx()
  virtio_ring: packed: always update desc_extra
  virtio_ring: packed: introduce vring_virtqueue_detach_packed()
  virtio_ring: packed: extract virtqueue_update_packed()
  virtio_ring: packed: extract detach_from_vring_packed()
  virtio_ring: packed: support copy from vring
  virtio_ring: packed: introduce vring_reuse_bufs_packed()
  virtio_ring: packed: resize support re-use buffers
  virtio_ring: virtqueue_resize() no longer call recycle() directly

 drivers/virtio/virtio_ring.c | 685 ++++++++++++++++++++++++++---------
 1 file changed, 518 insertions(+), 167 deletions(-)

--
2.31.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

             reply	other threads:[~2022-04-24  2:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24  2:40 Xuan Zhuo [this message]
2022-04-24  2:40 ` [RFC PATCH 00/16] virtio_ring: resize support re-use the old buffers Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 01/16] virtio_ring: split: vring_unmap_one_split() get extra by arg Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 02/16] virtio_ring: split: introduce vring_virtqueue_detach_split() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 03/16] virtio_ring: split: extract virtqueue_update_split() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 04/16] virtio_ring: split: extract detach_from_vring_split() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 05/16] virtio_ring: split: support copy from vring Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 06/16] virtio_ring: split: introduce vring_reuse_bufs_split() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 07/16] virtio_ring: split: resize support re-use buffers Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 08/16] virtio_ring: packed: extract next_idx() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 09/16] virtio_ring: packed: always update desc_extra Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 10/16] virtio_ring: packed: introduce vring_virtqueue_detach_packed() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 11/16] virtio_ring: packed: extract virtqueue_update_packed() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 12/16] virtio_ring: packed: extract detach_from_vring_packed() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 13/16] virtio_ring: packed: support copy from vring Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 14/16] virtio_ring: packed: introduce vring_reuse_bufs_packed() Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 15/16] virtio_ring: packed: resize support re-use buffers Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo
2022-04-24  2:40 ` [RFC PATCH 16/16] virtio_ring: virtqueue_resize() no longer call recycle() directly Xuan Zhuo
2022-04-24  2:40   ` Xuan Zhuo

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=20220424024044.94749-1-xuanzhuo@linux.alibaba.com \
    --to=xuanzhuo@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.