qemu-patch-raspberry4/hw/display
Paolo Bonzini 51b19ebe43 virtio: move allocation to virtqueue_pop/vring_pop
The return code of virtqueue_pop/vring_pop is unused except to check for
errors or 0.  We can thus easily move allocation inside the functions
and just return a pointer to the VirtQueueElement.

The advantage is that we will be able to allocate only the space that
is needed for the actual size of the s/g list instead of the full
VIRTQUEUE_MAX_SIZE items.  Currently VirtQueueElement takes about 48K
of memory, and this kind of allocation puts a lot of stress on malloc.
By cutting the size by two or three orders of magnitude, malloc can
use much more efficient algorithms.

The patch is pretty large, but changes to each device are testable
more or less independently.  Splitting it would mostly add churn.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2016-02-06 20:39:07 +02:00
..
ads7846.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
blizzard.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
blizzard_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
cg3.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
cirrus_vga.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
cirrus_vga_rop.h cirrus: Fix host CPU blits 2014-07-11 10:17:02 +02:00
cirrus_vga_rop2.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
exynos4210_fimd.c arm: Clean up includes 2016-01-29 15:07:23 +00:00
framebuffer.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
framebuffer.h framebuffer: set DIRTY_MEMORY_VGA on RAM that is used for the framebuffer 2015-07-24 13:57:45 +02:00
g364fb.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
jazz_led.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
Makefile.objs virtio-gpu: add 3d mode and virgl rendering support. 2015-10-08 10:31:35 +02:00
milkymist-tmu2.c lm32: Clean up includes 2016-01-29 15:07:22 +00:00
milkymist-vgafb.c lm32: Clean up includes 2016-01-29 15:07:22 +00:00
milkymist-vgafb_template.h milkymist-vgafb: swap pixel data in source buffer 2014-02-04 19:34:30 +01:00
omap_dss.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
omap_lcd_template.h arm: explicitly mark device loads as little-endian 2015-12-17 13:37:13 +00:00
omap_lcdc.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
pl110.c arm: Clean up includes 2016-01-29 15:07:23 +00:00
pl110_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
pxa2xx_lcd.c arm: Clean up includes 2016-01-29 15:07:23 +00:00
pxa2xx_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
qxl-logger.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
qxl-render.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
qxl.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
qxl.h qxl: allow to specify head limit to qxl driver 2015-07-16 17:31:05 +02:00
sm501.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
sm501_template.h hw: use ld_p/st_p instead of ld_raw/st_raw 2014-06-05 16:04:17 +02:00
ssd0303.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
ssd0323.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
tc6393xb.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
tc6393xb_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
tcx.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
vga-helpers.h vga: Rename vga_template.h to vga-helpers.h 2014-09-30 13:34:09 +02:00
vga-isa-mm.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
vga-isa.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
vga-pci.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
vga.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
vga.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
vga_int.h virtio-vga: add virtio gpu device with vga compatibility 2015-06-12 10:13:23 +02:00
virtio-gpu-3d.c virtio-gpu: block any rendering until client (ui) is done 2016-02-03 10:41:36 +01:00
virtio-gpu-pci.c virtio: Clean up includes 2016-01-29 15:07:23 +00:00
virtio-gpu.c virtio: move allocation to virtqueue_pop/vring_pop 2016-02-06 20:39:07 +02:00
virtio-vga.c virtio-gpu: block any rendering until client (ui) is done 2016-02-03 10:41:36 +01:00
vmware_vga.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
xenfb.c xen: Clean up includes 2016-01-29 15:07:23 +00:00