From: Ross Burton <ross.bur...@arm.com>

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.bur...@arm.com>
---
 meta/classes-recipe/qemuboot.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/classes-recipe/qemuboot.bbclass 
b/meta/classes-recipe/qemuboot.bbclass
index e30b380c3dc..5c4bbd67371 100644
--- a/meta/classes-recipe/qemuboot.bbclass
+++ b/meta/classes-recipe/qemuboot.bbclass
@@ -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"
 
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188755): 
https://lists.openembedded.org/g/openembedded-core/message/188755
Mute This Topic: https://lists.openembedded.org/mt/101795308/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to