> On 13 May 2022, at 08:15, Florent Carli <fcarli@xxxxxxxxx> wrote: > > Hello, > > When I run a cyclictest with a small interval in a guest, even though > the guest's cpu load is small (2-3%) the host qemu-system thread is > showing 100% cpu utilization, almost all of it being "system/kernel". > There seems to be a threshold effect: > - on my system an interval of 220us creates no problem (host > qemu-system thread is 4% user and 1% system) > - an interval of 210us shows the host qemu-system thread at 4% user > and 50% system) > - an interval of 200us makes the host qemu-system thread at 4% user > and 95% system > > Those threshold values are probably not universal... > > I'm using kvm with qemu on x86-64, and this issue seems easily > reproducible (yocto with a 5.15rt kernel, debian stable with a 5.10rt > kernel, or a non-rt 5.10 or a backported 5.16rt kernel, etc.). I > reproduced this issue on a debian stable non-RT kernel to be sure the > problem was not due to preempt-rt. > My cmdlines for host and guest are very basic: ipv6.disable=1 efi=runtime > Vcpupinning does not change the outcome. > > I'd love to understand the cause of this behavior and if there's > something to be done to solve this. > Thanks a lot. I suspect this is related to this: https://lkml.kernel.org/kvm/ad6184a3-5de6-9a9d-77f8-84b6b47efb04@xxxxxxxxx/T/ Can you try adjusting poll_threshold_ns to confirm? > > Florent. >