linux-stable/arch/x86
Wanpeng Li 3b8a5df6c4 KVM: LAPIC: Tune lapic_timer_advance_ns automatically
In cloud environment, lapic_timer_advance_ns is needed to be tuned for every CPU
generations, and every host kernel versions(the kvm-unit-tests/tscdeadline_latency.flat
is 5700 cycles for upstream kernel and 9600 cycles for our 3.10 product kernel,
both preemption_timer=N, Skylake server).

This patch adds the capability to automatically tune lapic_timer_advance_ns
step by step, the initial value is 1000ns as 'commit d0659d946b ("KVM: x86:
add option to advance tscdeadline hrtimer expiration")' recommended, it will be
reduced when it is too early, and increased when it is too late. The guest_tsc
and tsc_deadline are hard to equal, so we assume we are done when the delta
is within a small scope e.g. 100 cycles. This patch reduces latency
(kvm-unit-tests/tscdeadline_latency, busy waits, preemption_timer enabled)
from ~2600 cyles to ~1200 cyles on our Skylake server.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-10-17 00:25:54 +02:00
..
boot Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
configs
crypto crypto: x86/aegis,morus - Do not require OSXSAVE for SSE2 2018-09-14 14:08:27 +08:00
entry x86/vdso: Fix vDSO build if a retpoline is emitted 2018-08-20 18:04:41 +02:00
events perf/x86/intel: Add support/quirk for the MISPREDICT bit on Knights Landing CPUs 2018-09-10 10:03:01 +02:00
hyperv x86/hyper-v: rename ipi_arg_{ex,non_ex} structures 2018-09-20 00:51:42 +02:00
ia32
include KVM: x86: Control guest reads of MSR_PLATFORM_INFO 2018-09-20 00:51:46 +02:00
kernel x86/APM: Fix build warning when PROC_FS is not enabled 2018-09-15 10:16:25 +02:00
kvm KVM: LAPIC: Tune lapic_timer_advance_ns automatically 2018-10-17 00:25:54 +02:00
lib x86/nmi: Fix NMI uaccess race against CR3 switching 2018-08-31 17:08:22 +02:00
math-emu
mm x86/mm: Use WRITE_ONCE() when setting PTEs 2018-09-08 12:30:36 +02:00
net bpf, x32: Fix regression caused by commit 24dea04767 2018-07-26 02:51:12 +02:00
oprofile
pci PCI: Make early dump functionality generic 2018-06-29 20:06:07 -05:00
platform x86/efi: Load fixmap GDT in efi_call_phys_epilog() before setting %cr3 2018-09-12 21:53:34 +02:00
power Power management updates for 4.19-rc1 2018-08-14 13:12:24 -07:00
purgatory kbuild: move bin2c back to scripts/ from scripts/basic/ 2018-07-18 01:18:05 +09:00
ras
realmode
tools x86/relocs: Add __end_rodata_aligned to S_REL 2018-08-09 20:42:07 +02:00
um Consolidation of Kconfig files by Christoph Hellwig. 2018-08-15 13:05:12 -07:00
video
xen xen: fixes for 4.19-rc2 2018-08-31 08:45:16 -07:00
.gitignore
Kbuild
Kconfig x86/Kconfig: Fix trivial typo 2018-08-27 10:29:14 +02:00
Kconfig.cpu
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile x86: Allow generating user-space headers without a compiler 2018-08-31 17:08:22 +02:00
Makefile.um kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
Makefile_32.cpu