Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-15 Thread Paolo Bonzini
> > if (!indirect) > > total_bufs = num_bufs; > > Here (http://article.gmane.org/gmane.comp.emulators.qemu.block/6620) you > meant > > +in_total += desc.len; > > and > > +out_total += desc.len; > Yes, I did... I changed the patch and will

Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-15 Thread Vincenzo Maffione
> @@ -415,15 +399,15 @@ void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned > int *in_bytes, > exit(1); > } > > -if (vring_desc_flags(vdev, desc_pa, i) & VRING_DESC_F_WRITE) { > -in_total += vring_desc_len(vdev, desc_pa, i); > +

Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-14 Thread Vincenzo Maffione
2015-12-14 17:06 GMT+01:00 Paolo Bonzini : > > > On 14/12/2015 15:51, Vincenzo Maffione wrote: >> >> This patch slightly rewrites the code to reduce the number of accesses, since >> many of them seems unnecessary to me. After this reduction, the bottleneck >> jumps from 1 Mpps to 2 Mpps. >> >> Patc

Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-14 Thread Paolo Bonzini
On 14/12/2015 15:51, Vincenzo Maffione wrote: > > This patch slightly rewrites the code to reduce the number of accesses, since > many of them seems unnecessary to me. After this reduction, the bottleneck > jumps from 1 Mpps to 2 Mpps. > > Patch is not complete (e.g. it still does not properly

[Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-14 Thread Vincenzo Maffione
Hi, I am doing performance experiments to test how QEMU behaves when the guest is transmitting (short) network packets at very high packet rates, say over 1Mpps. I run a netmap application in the guest to generate high packet rates, but this is not relevant to this discussion. The only important