qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mysterious slowdown when debugging a kvm guest within system emulation


From: Janne Karhunen
Subject: mysterious slowdown when debugging a kvm guest within system emulation
Date: Tue, 11 May 2021 18:15:30 +0300

Hi,

I'm hacking on our own hypervisor variant for mobile use
(https://github.com/jkrh/kvms) and I use QEMU as a development tool
for the job. I can mimic a generic arm64 host and run a bunch of KVM
guests on it. Everything seems to be in order QEMU wise and things
seem to work pretty much per the spec, apart that the cache is just
way too reliable ;)

That being said, now I'm not sure if I'm looking at a QEMU bug or my
own. Executing KVM guest paging seems to gradually slow down if the
given kvm guest has a debugger attached to it within a system
emulation. Without the debugger everything is fine. Note that I can
have the host qemu and a debugger attached to it just fine, things
will always work fine. The issue only arises when a new KVM guest is
being spawned under a debugger within the system emulation.

If I log this from my hypervisor, everything seems fine. Page faults
are being served OK, the execution speed just slowly slows down and it
will probably take a day for a guest to boot. The funny observation is
that if I interrupt that debugger session (the kvm guest one), allow
it to rest a sec and hit continue, the page faults speed up again for
a while. I can also happily 'stepi' the code and everything is always
fine, things will only drastically slow down during free execution and
having the debugger attached to it.

Any pointers on how to debug and see where the QEMU spends the time?
It looks to me it's really the instructions that become heavier and
heavier over time as the guest goes on.


--
Janne



reply via email to

[Prev in Thread] Current Thread [Next in Thread]