Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 5:38 PM, Paolo Bonzini wrote: > Il 31/07/2014 04:07, Ming Lei ha scritto: >> On Wed, Jul 30, 2014 at 9:51 PM, Paolo Bonzini wrote: >>> Il 30/07/2014 13:39, Ming Lei ha scritto: diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a60104c..94

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 04:07, Ming Lei ha scritto: > On Wed, Jul 30, 2014 at 9:51 PM, Paolo Bonzini wrote: >> Il 30/07/2014 13:39, Ming Lei ha scritto: >>> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h >>> index a60104c..943e72f 100644 >>> --- a/include/hw/virtio/virtio.h >>> +++ b/i

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Ming Lei
On Wed, Jul 30, 2014 at 10:40 PM, Michael S. Tsirkin wrote: > On Wed, Jul 30, 2014 at 03:51:22PM +0200, Paolo Bonzini wrote: >> Il 30/07/2014 13:39, Ming Lei ha scritto: >> > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h >> > index a60104c..943e72f 100644 >> > --- a/include/

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Ming Lei
On Wed, Jul 30, 2014 at 9:51 PM, Paolo Bonzini wrote: > Il 30/07/2014 13:39, Ming Lei ha scritto: >> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h >> index a60104c..943e72f 100644 >> --- a/include/hw/virtio/virtio.h >> +++ b/include/hw/virtio/virtio.h >> @@ -84,12 +84,17 @@

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 16:40, Michael S. Tsirkin ha scritto: > As long as you relying on this, why not allocate in_sg/out_sg > separately? Because allocations can be expensive. > In any case, a bunch of code needs to be audited to make sure > no one assumes we can always stick VIRTQUEUE_MAX_SIZE there. >

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Michael S. Tsirkin
On Wed, Jul 30, 2014 at 03:51:22PM +0200, Paolo Bonzini wrote: > Il 30/07/2014 13:39, Ming Lei ha scritto: > > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > > index a60104c..943e72f 100644 > > --- a/include/hw/virtio/virtio.h > > +++ b/include/hw/virtio/virtio.h > > @@ -84,

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > index a60104c..943e72f 100644 > --- a/include/hw/virtio/virtio.h > +++ b/include/hw/virtio/virtio.h > @@ -84,12 +84,17 @@ typedef struct VirtQueue VirtQueue; > typedef struct VirtQueu

[Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-30 Thread Ming Lei
VirtQueueElement is used in performance senstive path, so cut its size by half to speed up its allocation and decrease memory footprint in the dataplane I/O path. Signed-off-by: Ming Lei --- hw/net/virtio-net.c |4 +++- hw/virtio/dataplane/vring.c | 23 ++- hw/v