]> git.baikalelectronics.ru Git - kernel.git/commit
x86/timer: Force PIT initialization when !X86_FEATURE_ARAT
authorJan Stancek <jstancek@redhat.com>
Sat, 7 Sep 2019 22:50:40 +0000 (00:50 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 8 Sep 2019 07:01:15 +0000 (09:01 +0200)
commit146979b00a2fa408dedeb3f541e2fcbfc563bff5
tree31c65e7de8fcd3604497fcd8bf93b65cc3ed6cf7
parent34b704c5a0e286476e5be9d26534e25b751f44c3
x86/timer: Force PIT initialization when !X86_FEATURE_ARAT

KVM guests with commit 4a08095c7df8 ("x86/timer: Skip PIT initialization on
modern chipsets") applied to guest kernel have been observed to have
unusually higher CPU usage with symptoms of increase in vm exits for HLT
and MSW_WRITE (MSR_IA32_TSCDEADLINE).

This is caused by older QEMUs lacking support for X86_FEATURE_ARAT.  lapic
clock retains CLOCK_EVT_FEAT_C3STOP and nohz stays inactive.  There's no
usable broadcast device either.

Do the PIT initialization if guest CPU lacks X86_FEATURE_ARAT.  On real
hardware it shouldn't matter as ARAT and DEADLINE come together.

Fixes: 4a08095c7df8 ("x86/timer: Skip PIT initialization on modern chipsets")
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/apic/apic.c