]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
qemuboot: reduce default size of software I/O translation buffer
authorRoss Burton <ross.burton@arm.com>
Fri, 6 Oct 2023 11:21:19 +0000 (12:21 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Oct 2023 14:50:43 +0000 (15:50 +0100)
With 6.5+ (specifically, if DMA_BOUNCE_UNALIGNED_KMALLOC is set) the
SWIOTLB is used, and it defaults to 64MB. This is too much when there's
only 256MB of RAM, so request 0 slabs and lets the kernel round up to
the appropriate minimum (1MB on aarch64, typically). In virtual hardware
there's very little need for these bounce buffers, so the 64MB would be
mostly wasted.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/qemuboot.bbclass

index e30b380c3dc33833bb6299f9ae8ac02bebdf1290..5c4bbd673717bc5e434ff2d61598f1e11e6a6b27 100644 (file)
@@ -107,6 +107,13 @@ QB_ROOTFS_EXTRA_OPT ?= ""
 QB_GRAPHICS ?= ""
 QB_NFSROOTFS_EXTRA_OPT ?= ""
 
+# With 6.5+ (specifically, if DMA_BOUNCE_UNALIGNED_KMALLOC is set) the SW IO TLB
+# is used, and it defaults to 64MB. This is too much when there's only 256MB of
+# RAM, so request 0 slabs and lets the kernel round up to the appropriate minimum
+# (1MB, typically). In virtual hardware there's very little need for these bounce
+# buffers, so the 64MB would be mostly wasted.
+QB_KERNEL_CMDLINE_APPEND:append = " swiotlb=0"
+
 # This should be kept align with ROOT_VM
 QB_DRIVE_TYPE ?= "/dev/sd"