Re: [PATCH V11 19/19] virtio_ring: add in order support
From: Jason Wang
Date: Mon Dec 29 2025 - 02:30:08 EST
On Sat, Dec 27, 2025 at 3:57 AM Michael S. Tsirkin <mst@xxxxxxxxxx> wrote:
>
> On Thu, Dec 25, 2025 at 12:26:08PM +0800, Jason Wang wrote:
> > This patch implements in order support for both split virtqueue and
> > packed virtqueue. Performance 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: 4.51Mpps | 5.30Mpps | +17%
> > 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.
> >
> > Reviewed-by: Eugenio Pérez <eperezma@xxxxxxxxxx>
> > Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
> > ---
[...]
> > +unmap_release:
> > + err_idx = i;
> > + i = head;
> > + vq->packed.avail_used_flags = avail_used_flags;
>
> Hmm. But this does not roll back packed.avail_wrap_counter.
> Shouldn't it?
Fixed.
Thanks