[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <E08AB80C-D1A7-483E-9424-4F893B7161B5@linux.dev>
Date: Fri, 25 Jul 2025 13:56:15 -0700
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: Jason Wang <jasowang@...hat.com>
Cc: mst@...hat.com,
xuanzhuo@...ux.alibaba.com,
eperezma@...hat.com,
virtualization@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 19/19] virtio_ring: add in order support
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@...hat.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
Powered by blists - more mailing lists