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

Re: [vfio-users] cpu usage in guest != cpu usage in host, even with exclusive pinning

I don't know what halt_poll_ns does, but wouldn't setting it to 0 disable it and is disabling it bad?

So, what does halt_poll_ns do anyways?

On 4 April 2016 at 19:17, Okky Hendriansyah <okky htf gmail com> wrote:
On Mon, Apr 4, 2016 at 8:20 AM, Jayme Howard <g prime gmail com> wrote:
Okay wow, Alex.  That made a huge difference immediately.  That dropped me from 90% to 33% on the main thread, and all the children are below 10%. 

On Sun, Apr 3, 2016 at 8:07 PM, Alex Williamson <alex l williamson gmail com> wrote:
If this is the issue I think it is, the unraid folks bisected this and found the culprit as:

aca6ff2 KVM: dynamic halt-polling

It seems to be a poor interaction of the halt polling interval vs the timer ticks on win10.  You can pick a different polling interval with the kvm module option halt_poll_ns.  The default is 500000.  It seemed that setting this to 400000 or lower resolves the issue.  You can do this via a modprobe entry, 'options kvm halt_poll_ns=400000' or on the kernel command line with kvm.halt_poll_ns=400000.  You can also change it dynamically via 'echo 400000 > /sys/module/kvm/parameters/halt_poll_ns'

I can also confirm that tuning the halt_poll_ns kvm module parameter on kernel 4.4.5 drops the host CPU usage! Haven't done any game benchmark but from listening to music the CPU load is as low as it is on 4.1.20. Although reducing the value to what Alex (400000) had suggested is probably sufficient, I'm currently trying out the value of 0 for it just like what Unraid 6.20 beta 20 changelog had it set on default [1]. Thanks for the info, Alex.

Best regards,
Okky Hendriansyah

vfio-users mailing list
vfio-users redhat com

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