Skip to content

Commit

Permalink
reduce default SWIOTLB size when no PCI devs are used
Browse files Browse the repository at this point in the history
Linux inside HVM will allocate 64MB for bouncing DMA (SWIOTLB) by
default. If no real PCI device is assigned, that's way too much, and
wastes over 15% of VM's initial memory.
With real PCI devices, it's usually too much too, but it's very device
specific, so don't risk breaking it. In other cases, reduce default to
4MB.

Note PVH domain will not allocate SWIOTLB anyway, as no PCI devices are
there at all. This difference contributes to the VM start time, so
reducing SWIOTLB should also improve that part.

QubesOS/qubes-issues#6174
  • Loading branch information
marmarek committed Jan 18, 2023
1 parent 3972c6c commit 07998b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'libvirt_uri': 'xen:///',
'memory': 400,
'hvm_memory': 400,
'kernelopts': "",
'kernelopts': "swiotlb=2048",
'kernelopts_pcidevs': "",
'kernelopts_common': ('root=/dev/mapper/dmroot ro nomodeset console=hvc0 '
'rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 '),
Expand Down

0 comments on commit 07998b8

Please sign in to comment.