Skip to content

RFC kvm : Paravirt-spinlock support for KVM guests

Raghavendra K T kvm lkml virtualization xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest5 patches 32 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5debugfs: Add support to print u32 array in debugfsarch/x86/xen/debugfs.c arch/x86/xen/debugfs.h fs/debugfs/file.c +1 more+119 -1080 replies
1/5debugfs: Add support to print u32 array in debugfsarch/x86/xen/debugfs.c arch/x86/xen/debugfs.h fs/debugfs/file.c +1 more+119 -1080 replies
1/5debugfs: Add support to print u32 array in debugfsarch/x86/xen/debugfs.c arch/x86/xen/debugfs.h fs/debugfs/file.c +1 more+119 -1082 replies
2/5debugfs: Renaming of xen functions and change unsigned to u32arch/x86/xen/spinlock.c fs/debugfs/file.c include/linux/debugfs.h+15 -153 replies
2/5debugfs: Renaming of xen functions and change unsigned to u32arch/x86/xen/spinlock.c fs/debugfs/file.c include/linux/debugfs.h+15 -150 replies
3/5kvm hypervisor : Add two hypercalls to support pv-ticketlockarch/x86/include/asm/kvm_para.h arch/x86/kvm/x86.c include/linux/kvm.h +3 more+77 -10 replies
3/5kvm hypervisor : Add two hypercalls to support pv-ticketlockarch/x86/include/asm/kvm_para.h arch/x86/kvm/x86.c include/linux/kvm.h +3 more+77 -10 replies
3/5kvm hypervisor : Add two hypercalls to support pv-ticketlockarch/x86/include/asm/kvm_para.h arch/x86/kvm/x86.c include/linux/kvm.h +3 more+77 -113 replies
4/5kvm guest : Added configuration support to enable debug information for KVM Guestsarch/x86/Kconfig+9 -06 replies
4/5kvm guest : Added configuration support to enable debug information for KVM Guestsarch/x86/Kconfig+9 -00 replies
5/5kvm guest : pv-ticketlocks support for linux guests running on KVM hypervisorarch/x86/include/asm/kvm_para.h arch/x86/kernel/head32.c arch/x86/kernel/head64.c +1 more+262 -10 replies
5/5kvm guest : pv-ticketlocks support for linux guests running on KVM hypervisorarch/x86/include/asm/kvm_para.h arch/x86/kernel/head32.c arch/x86/kernel/head64.c +1 more+262 -10 replies
5/5kvm guest : pv-ticketlocks support for linux guests running on KVM hypervisorarch/x86/include/asm/kvm_para.h arch/x86/kernel/head32.c arch/x86/kernel/head64.c +1 more+262 -18 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH RFC V2 0/5] kvm : Paravirt-spinlock support for KVM guests

The 5-patch series to follow this email extends KVM-hypervisor and Linux guest running on KVM-hypervisor to support pv-ticket spinlocks, based heavily on Xen's implementation.

Two hypercalls are being introduced in KVM hypervisor, one that allows a vcpu (spinning on a lock) to block and another that allows a vcpu to kick another out of blocking state.

This is discussed in : (posted by Srivatsa V).
https://lkml.org/lkml/2010/7/26/24
https://lkml.org/lkml/2011/1/19/212

The BASE patch is tip rc9 + Jeremy's following patches. compare exchange (https://lkml.org/lkml/2011/8/29/321),
xadd (https://lkml.org/lkml/2011/10/4/328)
x86/ticketlocklock (https://lkml.org/lkml/2011/10/12/496).

Changes since last posting:
- rebased patchesto -rc9
- synchronization related changes based on Jeremy's changes (Jeremy Fitzhardinge <[email protected]>) pointed by Stephan Diestelhorst <[email protected]>
- enabling 32 bit guests
- splitted patches into two more chunks

Results:

set up :
Kernel for host/guest : 3.1-rc9 + Jeremys ticketlock cleanup, xadd, pv spinlock patches as BASE

3 guests with 8VCPU, 4GB RAM, 1 used for kernbench (kernbench -f -H -M -o 20) other for cpuhog (shell script while true with an instruction)

scenario A: unpinned
scenario B: each vcpu pinned to corresponding cpu

1x: no hogs
2x: 8hogs in one guest
3x: 8hogs each in two guest

Result for Non PLE machine :
Machine : IBM xSeries with Intel(R) Xeon(R) x5570 2.93GHz CPU with 8 core , 64GB RAM
BASE BASE+patch %improvement
mean (sd) mean (sd)
Scenario A:
case 1x: 157.495 (15.2924) 148.355 (7.35479) 5.80336
case 2x: 761.955 (581.384) 247.306 (64.4707) 67.5432
case 3x: 2804.36 (2613.57) 261.522 (85.0856) 90.6744

Scenario B
case 1x: 1241.86 (812.155) 313.805 (140.99) 74.731
case 2x: 1277.32 (771.316) 308.325 (124.808) 75.8616
case 3x: 1239.45 (860.012) 307.535 (124.243) 75.1878

Result for PLE machine:
Machine : IBM xSeries with Intel(R) Xeon(R) X7560 2.27GHz CPU with 32/64 core, with 8
online cores and 4*64GB RAM

BASE BASE+patch %improvement
mean (sd) mean (sd)
Scenario A:
case 1x: 72.7133 (43.7109) 70.0734 (37.7866) 3.63056
case 2x: 124.138 (79.9515) 119.28 (81.3597) 3.91339
case 3x: 174.561 (132.209) 159.283 (116.232) 8.75224

Scenario B
case 1x: 166.101 (119.313) 160.056 (117.446) 3.63935
case 2x: 167.421 (120.767) 158.133 (115.022) 5.54769
case 3x: 169.317 (122.088) 159.353 (116.737) 5.88482

Srivatsa Vaddagiri, Suzuki Poulose, Raghavendra K T (5):
Add debugfs support to print u32-arrays in debugfs Renaming of xen functions and change unsigned to u32
Add two hypercalls to KVM hypervisor to support pv-ticketlocks Added configuration support to enable debug information for KVM Guests pv-ticketlocks support for linux guests running on KVM hypervisor

 arch/x86/Kconfig                |    9 ++
 arch/x86/include/asm/kvm_para.h |   12 ++-
 arch/x86/kernel/head32.c        |    3 +
 arch/x86/kernel/head64.c        |    3 +
 arch/x86/kernel/kvm.c           |  247 +++++++++++++++++++++++++++++++++++++++
 arch/x86/kvm/x86.c              |   67 +++++++++++-
 arch/x86/xen/debugfs.c          |  104 ----------------
 arch/x86/xen/debugfs.h          |    4 -
 arch/x86/xen/spinlock.c         |    2 +-
 fs/debugfs/file.c               |  108 +++++++++++++++++
 include/linux/debugfs.h         |   11 ++
 include/linux/kvm.h             |    1 +
 include/linux/kvm_host.h        |    5 +
 include/linux/kvm_para.h        |    2 +
 virt/kvm/kvm_main.c             |    1 +
 15 files changed, 468 insertions(+), 111 deletions(-)

---