Do you use preemptive kernel or low latency one?
I have kernel 5.4.91 preemptive and haven't experienced any of this
issues with RT priority qemu. I didn't run stress, but some of the
games are cpu hungry and load all cpu cores.
A few differences - I don't use libvirt and run qemu from command line
and hugetlb for vm ram and give vm 10 cpu threads out of 16.

# Allow realtime tasks to monopolize CPU
echo -1 > /proc/sys/kernel/sched_rt_runtime_us
This will not help the host, but help VM responsiveness and audio.

I have much better audio with 'usb-audio' qemu device.
I also stopped pinning vcpus, run qemu via 'chrt -r 5 qemu-system ....'

When I was pinning rt cpus I was tweaking host irq smp affinity list
(not needed for isol_cpus).


On Fri, Jan 29, 2021 at 5:05 AM Michael Slade <msl...@epic-code.com.au> wrote:
>
> This may not strictly be VFIO-related but it is latency-related. Feel
> free to suggest another place to post.
>
> I have a VM which has 4 of the host's 8 cores, and has multiple PCI
> devices passed through - GPU, audio, USB and SATA.
>
> If I give the vCPU threads RT priority (via libvirt XML), and then run
> `stress -c 4` on the VM, the host would freeze.
>
> If I dedicate the 4 cores to the VM via isolcpus= and CPU pinning, then
> the host is okay but there are still other issues, e.g. the guest's
> audio glitches like crazy.
>
> Everything is fine (well mostly fine) if I refrain from setting RT
> priority on the vCPU threads.
>
> What's happening here? Is this a scheduling bug?
>
> Host and guest are running kernel 5.4.91, and qemu is stable-5.0.
>
>
> _______________________________________________
> vfio-users mailing list
> vfio-users@redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>

_______________________________________________
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users

Reply via email to