public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] Utilizing VMX preemption for timer virtualization
@ 2016-05-20  1:44 Yunhong Jiang
  2016-05-20  1:44 ` [RFC PATCH 1/5] Add the kvm sched_out hook Yunhong Jiang
                   ` (6 more replies)
  0 siblings, 7 replies; 29+ messages in thread
From: Yunhong Jiang @ 2016-05-20  1:44 UTC (permalink / raw)
  To: kvm; +Cc: rkrcmar, pbonzini

The VMX-preemption timer is a feature on VMX, it counts down, from the
value loaded by VM entry, in VMX nonroot operation. When the timer
counts down to zero, it stops counting down and a VM exit occurs.

The VMX preemption timer for tsc deadline timer virtualization. The
VMX preemption timer is armed when the vCPU is running, and a VMExit
will happen if the virtual TSC deadline timer expires.

When the vCPU thread is scheduled out, the tsc deadline timer
virtualization will be switched to use the current solution, i.e. use
the timer for it. It's switched back to VMX preemption timer when the
vCPU thread is scheduled int.

This solution replace the complex OS's hrtimer system, and also the
host timer interrupt handling cost, with a preemption_timer VMexit. It
fits well for some NFV usage scenario, when the vCPU is bound to a
pCPU and the pCPU is isolated, or some similar scenarioes.

However, it possibly has impact if the vCPU thread is scheduled in/out
very frequently, because it switches from/to the hrtimer emulation a
lot. A module parameter is provided to turn it on or off.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>

Yunhong Jiang (5):
  Add the kvm sched_out hook
  Utilize the vmx preemption timer
  Separate the start_sw_tscdeadline
  Utilize the vmx preemption timer for tsc deadline timer
  Adding trace for the hwemul_timer

 arch/arm/include/asm/kvm_host.h     |   1 +
 arch/mips/include/asm/kvm_host.h    |   1 +
 arch/powerpc/include/asm/kvm_host.h |   1 +
 arch/s390/include/asm/kvm_host.h    |   1 +
 arch/x86/include/asm/kvm_host.h     |   5 ++
 arch/x86/kvm/lapic.c                | 163 +++++++++++++++++++++++++++++++-----
 arch/x86/kvm/lapic.h                |  10 +++
 arch/x86/kvm/trace.h                |  48 +++++++++++
 arch/x86/kvm/vmx.c                  |  78 ++++++++++++++++-
 arch/x86/kvm/x86.c                  |  13 +++
 include/linux/kvm_host.h            |   1 +
 virt/kvm/kvm_main.c                 |   1 +
 12 files changed, 300 insertions(+), 23 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2016-05-24  1:32 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20  1:44 [RFC PATCH 0/5] Utilizing VMX preemption for timer virtualization Yunhong Jiang
2016-05-20  1:44 ` [RFC PATCH 1/5] Add the kvm sched_out hook Yunhong Jiang
2016-05-20  1:45 ` [RFC PATCH 2/5] Utilize the vmx preemption timer Yunhong Jiang
2016-05-20  9:45   ` Paolo Bonzini
2016-05-20  1:45 ` [RFC PATCH 3/5] Separate the start_sw_tscdeadline Yunhong Jiang
2016-05-20 10:16   ` Paolo Bonzini
2016-05-20  1:45 ` [RFC PATCH 4/5] Utilize the vmx preemption timer for tsc deadline timer Yunhong Jiang
2016-05-20 10:34   ` Paolo Bonzini
2016-05-20 22:06     ` Jiang, Yunhong
2016-05-21 12:38       ` Paolo Bonzini
2016-05-22  0:21       ` Wanpeng Li
2016-05-23 22:58         ` yunhong jiang
2016-05-24  0:53           ` Wanpeng Li
2016-05-24  0:55             ` yunhong jiang
2016-05-24  1:16               ` Wanpeng Li
2016-05-24  1:20                 ` yunhong jiang
2016-05-24  1:32                   ` Wanpeng Li
2016-05-20  1:45 ` [RFC PATCH 5/5] Adding trace for the hwemul_timer Yunhong Jiang
2016-05-20 10:28   ` Paolo Bonzini
2016-05-20  6:03 ` [RFC PATCH 0/5] Utilizing VMX preemption for timer virtualization Jan Kiszka
2016-05-20  9:41   ` Paolo Bonzini
2016-05-20 21:50   ` Jiang, Yunhong
2016-05-20 18:18 ` Marcelo Tosatti
2016-05-20 18:21   ` Marcelo Tosatti
2016-05-20 20:49   ` Paolo Bonzini
2016-05-20 22:27     ` Jiang, Yunhong
2016-05-20 23:53       ` yunhong jiang
2016-05-20 22:18   ` Jiang, Yunhong
2016-05-21  0:45     ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox