On Sat, Jul 26, 2025 at 4:57 AM Thorsten Blum <thorsten.b...@linux.dev> wrote: > > 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 <jasow...@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
I've posted a fix here: https://lore.kernel.org/virtualization/20250725091129-mutt-send-email-...@kernel.org/T/#t Thanks > >