CCing Paolo since kvm-unit-tests use multiboot.
On Sun, Oct 10, 2021 at 09:10:05PM +0200, Adam Lackorzynski wrote:
Use DMA transfers in the multiboot loader to copy
data.
This significantly lowers QEMU's startup latency by
a factor of about 40, for example, going from 30sec
to 0.8sec when loading modules of 120MB in size.
This change has been used successfully for some time.
Signed-off-by: Marcus Hähnel <marcus.haeh...@kernkonzept.com>
Signed-off-by: Adam Lackorzynski <a...@l4re.org>
---
pc-bios/multiboot.bin | Bin 1024 -> 1536 bytes
pc-bios/optionrom/multiboot.S | 10 ++---
pc-bios/optionrom/optionrom.h | 77 ++++++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 5 deletions(-)
I tested with https://gitlab.com/kvm-unit-tests/kvm-unit-tests running:
export QEMU=`/path/to/qemu-system-x86_64 -L path/to/pc-bios/optionrom`
time ./run_test.sh
Before this patch:
real 3m5.578s
user 2m32.231s
sys 0m50.390s
After this patch:
real 2m55.614s
user 2m20.536s
sys 0m50.046s
It's still a good improvement, considering the fact that the images
aren't big.
Just a consideration, for blobs (kernel and initrd) I fully agree to use
DMA, but for 32bit variables is it useful?
However, this patch LGTM:
Tested-by: Stefano Garzarella <sgarz...@redhat.com>
Reviewed-by: Stefano Garzarella <sgarz...@redhat.com>