[Qemu-devel] [PATCH 05/10] virtio: slim down allocation of VirtQueueElements

2016-01-31 Thread Paolo Bonzini
Build the addresses and s/g lists on the stack, and then copy them to a VirtQueueElement that is just as big as required to contain this particular s/g list. The cost of the copy is minimal compared to that of a large malloc. When virtqueue_map is used on the destination side of migration or on l

Re: [Qemu-devel] [PATCH 05/10] virtio: slim down allocation of VirtQueueElements

2016-01-19 Thread Cornelia Huck
On Fri, 15 Jan 2016 13:41:53 +0100 Paolo Bonzini wrote: > Build the addresses and s/g lists on the stack, and then copy them > to a VirtQueueElement that is just as big as required to contain this > particular s/g list. The cost of the copy is minimal compared to that > of a large malloc. > > W

[Qemu-devel] [PATCH 05/10] virtio: slim down allocation of VirtQueueElements

2016-01-15 Thread Paolo Bonzini
Build the addresses and s/g lists on the stack, and then copy them to a VirtQueueElement that is just as big as required to contain this particular s/g list. The cost of the copy is minimal compared to that of a large malloc. When virtqueue_map is used on the destination side of migration or on l