From: Thorsten Blum <thorsten.blum@linux.dev>
To: Jason Wang <jasowang@redhat.com>
Cc: mst@redhat.com, xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4 19/19] virtio_ring: add in order support
Date: Fri, 25 Jul 2025 13:56:15 -0700 [thread overview]
Message-ID: <E08AB80C-D1A7-483E-9424-4F893B7161B5@linux.dev> (raw)
In-Reply-To: <20250724064017.26058-20-jasowang@redhat.com>
Hi Jason,
On 23. Jul 2025, at 23:40, Jason Wang wrote:
>
> This patch implements in order support for both split virtqueue and
> packed virtqueue. Perfomance could be gained for the device where the
> memory access could be expensive (e.g vhost-net or a real PCI device):
>
> Benchmark with KVM guest:
>
> Vhost-net on the host: (pktgen + XDP_DROP):
>
> in_order=off | in_order=on | +%
> TX: 5.20Mpps | 6.20Mpps | +19%
> RX: 3.47Mpps | 3.61Mpps | + 4%
>
> Vhost-user(testpmd) on the host: (pktgen/XDP_DROP):
>
> For split virtqueue:
>
> in_order=off | in_order=on | +%
> TX: 5.60Mpps | 5.60Mpps | +0.0%
> RX: 9.16Mpps | 9.61Mpps | +4.9%
>
> For packed virtqueue:
>
> in_order=off | in_order=on | +%
> TX: 5.60Mpps | 5.70Mpps | +1.7%
> RX: 10.6Mpps | 10.8Mpps | +1.8%
>
> Benchmark also shows no performance impact for in_order=off for queue
> size with 256 and 1024.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
This is in linux-next now, but I get the following compilation error:
drivers/virtio/virtio_ring.c:2113:40: error: variable 'id' is uninitialized when used here [-Werror,-Wuninitialized]
2113 | BAD_RING(vq, "id %u out of range\n", id);
| ^~
drivers/virtio/virtio_ring.c:60:32: note: expanded from macro 'BAD_RING'
60 | "%s:"fmt, (_vq)->vq.name, ##args); \
| ^~~~
./include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
./include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/virtio/virtio_ring.c:2077:19: note: initialize the variable 'id' to silence this warning
2077 | u16 last_used, id, last_used_idx;
| ^
| = 0
1 error generated.
Thanks,
Thorsten
next prev parent reply other threads:[~2025-07-25 20:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 6:39 [PATCH V4 00/19] virtio_ring " Jason Wang
2025-07-24 6:39 ` [PATCH V4 01/19] virtio_ring: rename virtqueue_reinit_xxx to virtqueue_reset_xxx() Jason Wang
2025-07-24 6:40 ` [PATCH V4 02/19] virtio_ring: switch to use vring_virtqueue in virtqueue_poll variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 03/19] virtio_ring: unify logic of virtqueue_poll() and more_used() Jason Wang
2025-07-24 6:40 ` [PATCH V4 04/19] virtio_ring: switch to use vring_virtqueue for virtqueue resize variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 05/19] virtio_ring: switch to use vring_virtqueue for virtqueue_kick_prepare variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 06/19] virtio_ring: switch to use vring_virtqueue for virtqueue_add variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 07/19] virtio: " Jason Wang
2025-07-24 6:40 ` [PATCH V4 08/19] virtio_ring: switch to use vring_virtqueue for enable_cb_prepare variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 09/19] virtio_ring: use vring_virtqueue for enable_cb_delayed variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 10/19] virtio_ring: switch to use vring_virtqueue for disable_cb variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 11/19] virtio_ring: switch to use vring_virtqueue for detach_unused_buf variants Jason Wang
2025-07-24 6:40 ` [PATCH V4 12/19] virtio_ring: use u16 for last_used_idx in virtqueue_poll_split() Jason Wang
2025-07-24 6:40 ` [PATCH V4 13/19] virtio_ring: introduce virtqueue ops Jason Wang
2025-07-24 6:40 ` [PATCH V4 14/19] virtio_ring: determine descriptor flags at one time Jason Wang
2025-07-24 6:40 ` [PATCH V4 15/19] virtio_ring: factor out core logic of buffer detaching Jason Wang
2025-07-24 6:40 ` [PATCH V4 16/19] virtio_ring: factor out core logic for updating last_used_idx Jason Wang
2025-07-24 6:40 ` [PATCH V4 17/19] virtio_ring: factor out split indirect detaching logic Jason Wang
2025-07-24 6:40 ` [PATCH V4 18/19] virtio_ring: factor out split " Jason Wang
2025-07-24 6:40 ` [PATCH V4 19/19] virtio_ring: add in order support Jason Wang
2025-07-25 13:15 ` Michael S. Tsirkin
2025-07-25 20:56 ` Thorsten Blum [this message]
2025-07-28 3:23 ` Jason Wang
2025-07-28 13:41 ` [PATCH V4 00/19] virtio_ring " Eugenio Perez Martin
2025-07-29 2:35 ` 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=E08AB80C-D1A7-483E-9424-4F893B7161B5@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@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®