]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: x86: reduce default value of halt_poll_ns parameter
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 29 Mar 2016 15:56:57 +0000 (17:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2016 06:42:07 +0000 (15:42 +0900)
commit84f2443e213727323064e581e281d778831fa859
treec150d3776e35aa2f390965c8adf8f6580a444f38
parent30d6a9fd6c11bd7b9e8f673da0f9caa22e2280fa
KVM: x86: reduce default value of halt_poll_ns parameter

commit 14ebda3394fd3e5388747e742e510b0802a65d24 upstream.

Windows lets applications choose the frequency of the timer tick,
and in Windows 10 the maximum rate was changed from 1024 Hz to
2048 Hz.  Unfortunately, because of the way the Windows API
works, most applications who need a higher rate than the default
64 Hz will just do

   timeGetDevCaps(&tc, sizeof(tc));
   timeBeginPeriod(tc.wPeriodMin);

and pick the maximum rate.  This causes very high CPU usage when
playing media or games on Windows 10, even if the guest does not
actually use the CPU very much, because the frequent timer tick
causes halt_poll_ns to kick in.

There is no really good solution, especially because Microsoft
could sooner or later bump the limit to 4096 Hz, but for now
the best we can do is lower a bit the upper limit for
halt_poll_ns. :-(

Reported-by: Jon Panozzo <jonp@lime-technology.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kvm_host.h