Re: [Qemu-devel] [PATCH V2 1/1] virtio:Allocate temporary VirtQueueElementOld on heap

2016-03-15 Thread Michael S. Tsirkin
On Tue, Mar 15, 2016 at 10:16:00AM +0100, Paolo Bonzini wrote: > > > On 15/03/2016 08:36, Jaya Tiwari wrote: > > > > This is not what that page suggests. It says: > > Make the stack array > > smaller and allocate on the heap in the rare case that the > > data does not fit in the

Re: [Qemu-devel] [PATCH V2 1/1] virtio:Allocate temporary VirtQueueElementOld on heap

2016-03-15 Thread Paolo Bonzini
On 15/03/2016 08:36, Jaya Tiwari wrote: > > This is not what that page suggests. It says: > Make the stack array > smaller and allocate on the heap in the rare case that the > data does not fit in the small array: > > This patch just uses heap unconditionally which is sure t

Re: [Qemu-devel] [PATCH V2 1/1] virtio:Allocate temporary VirtQueueElementOld on heap

2016-03-15 Thread Jaya Tiwari
On Tue, Mar 15, 2016 at 12:32 PM, Michael S. Tsirkin wrote: > On Mon, Mar 14, 2016 at 09:10:15PM +0530, Jaya Tiwari wrote: > > As per the list of functions in : > > http://wiki.qemu.org/BiteSizedTasks#Large_frames, > > qemu_get_virtqueue_element and qemu_put_virtqueue_element > > have large arra

Re: [Qemu-devel] [PATCH V2 1/1] virtio:Allocate temporary VirtQueueElementOld on heap

2016-03-15 Thread Michael S. Tsirkin
On Mon, Mar 14, 2016 at 09:10:15PM +0530, Jaya Tiwari wrote: > As per the list of functions in : > http://wiki.qemu.org/BiteSizedTasks#Large_frames, > qemu_get_virtqueue_element and qemu_put_virtqueue_element > have large arrays on stack. Hence, moving them to heap > This reduced their stack size

[Qemu-devel] [PATCH V2 1/1] virtio:Allocate temporary VirtQueueElementOld on heap

2016-03-14 Thread Jaya Tiwari
As per the list of functions in : http://wiki.qemu.org/BiteSizedTasks#Large_frames, qemu_get_virtqueue_element and qemu_put_virtqueue_element have large arrays on stack. Hence, moving them to heap This reduced their stack size from something 49248 to fit into less than 200. Signed-off-by: Jaya Ti