]> git.baikalelectronics.ru Git - kernel.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)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Apr 2016 10:10:10 +0000 (12:10 +0200)
commit9160ce5c85586fe644dcf30c88a04e544a05219b
tree752a3882bc9586f7e7b48ff3720d90e838823d02
parentf1f7b180f6092109289a64d2d1ff170f87bb1917
KVM: x86: reduce default value of halt_poll_ns parameter

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>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h