kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC V3 0/4] kvm : Paravirt-spinlock support for KVM guests
@ 2011-11-30  8:59 Raghavendra K T
  2011-11-30  8:59 ` [PATCH RFC V3 1/4] debugfs: Add support to print u32 array in debugfs Raghavendra K T
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Raghavendra K T @ 2011-11-30  8:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sedat Dilek, Stefano Stabellini, KVM,
	Jeremy Fitzhardinge, x86, H. Peter Anvin, Dave Jiang,
	Thomas Gleixner, Marcelo Tosatti, Yinghai Lu, Gleb Natapov,
	Ingo Molnar, Avi Kivity, Xen, Virtualization, Rik van Riel,
	Konrad Rzeszutek Wilk, LKML
  Cc: Srivatsa Vaddagiri, Peter Zijlstra, Raghavendra K T, Sasha Levin,
	Suzuki Poulose, Dave Hansen

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

One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.

The V2 change discussion was in:  
 https://lkml.org/lkml/2011/10/23/207
 
Previous discussions : (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 3.2-rc1 + Jeremy's following patches.
xadd (https://lkml.org/lkml/2011/10/4/328)
x86/ticketlocklock  (https://lkml.org/lkml/2011/10/12/496).

Changes in V3:
- rebased to 3.2-rc1
- use halt() instead of wait for kick hypercall.
- modify kick hyper call to do wakeup halted vcpu.
- hook kvm_spinlock_init to smp_prepare_cpus call (moved the call out of head##.c).
- fix the potential race when zero_stat is read.
- export debugfs_create_32 and add documentation to API.
- use static inline and enum instead of ADDSTAT macro. 
- add  barrier() in after setting kick_vcpu.
- empty static inline function for kvm_spinlock_init.
- combine the patches one and two readuce overhead.
- make KVM_DEBUGFS depends on DEBUGFS.
- include debugfs header unconditionally.

Changes in V2:
- rebased patchesto -rc9
- synchronization related changes based on Jeremy's changes (Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>) pointed by
Stephan Diestelhorst <stephan.diestelhorst@amd.com>
- enabling 32 bit guests
- splitted patches into two more chunks

 Srivatsa Vaddagiri, Suzuki Poulose, Raghavendra K T (4): 
  Add debugfs support to print u32-arrays in debugfs
  Add a hypercall 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
 
Results:
 From the results we can see that patched kernel performance is similar to
 BASE when  there is no lock contention. But once we start seeing more 
 contention, patched kernel outperforms BASE.

set up : 
Kernel for host/guest : 3.2-rc1 + Jeremy's 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

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.548 (10.624) 	 156.408 (11.1622) 	0.723589
case 2x:	 1110.18 (807.019) 	 310.96 (105.194) 	71.9901
case 3x:	 3110.36 (2408.03) 	 303.688 (110.474) 	90.2362

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:	 159.725 (47.4906) 	 159.07 (47.8133) 	0.41008
case 2x:	 190.957 (49.2976) 	 187.273 (50.5469) 	1.92923
case 3x:	 226.317 (88.6023) 	 223.698 (90.4362) 	1.15723

---
 13 files changed, 454 insertions(+), 112 deletions(-)
 arch/x86/Kconfig                |    9 ++
 arch/x86/include/asm/kvm_para.h |   17 +++-
 arch/x86/kernel/kvm.c           |  247 +++++++++++++++++++++++++++++++++++++++
 arch/x86/kvm/x86.c              |   28 +++++-
 arch/x86/xen/debugfs.c          |  104 ----------------
 arch/x86/xen/debugfs.h          |    4 -
 arch/x86/xen/spinlock.c         |    2 +-
 fs/debugfs/file.c               |  128 ++++++++++++++++++++
 include/linux/debugfs.h         |   11 ++
 include/linux/kvm.h             |    1 +
 include/linux/kvm_host.h        |    5 +
 include/linux/kvm_para.h        |    1 +
 virt/kvm/kvm_main.c             |    7 +
 13 files changed, 452 insertions(+), 112 deletions(-)

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

end of thread, other threads:[~2011-12-09 10:59 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30  8:59 [PATCH RFC V3 0/4] kvm : Paravirt-spinlock support for KVM guests Raghavendra K T
2011-11-30  8:59 ` [PATCH RFC V3 1/4] debugfs: Add support to print u32 array in debugfs Raghavendra K T
2011-12-06  0:13   ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-11-30  8:59 ` [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks Raghavendra K T
2011-12-01 11:11   ` Avi Kivity
2011-12-01 19:50     ` Raghavendra K T
2011-12-02 12:29       ` Raghavendra K T
2011-12-04 18:06       ` Raghavendra K T
2011-12-06 16:49         ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-12-07 10:53           ` Avi Kivity
2011-12-08 17:35       ` Raghavendra K T
2011-12-07 10:48   ` Marcelo Tosatti
2011-12-07 11:54     ` Raghavendra K T
2011-12-07 12:33       ` Marcelo Tosatti
2011-12-07 12:47         ` Avi Kivity
2011-12-07 13:39           ` Marcelo Tosatti
2011-12-07 14:52             ` Avi Kivity
2011-12-07 16:46               ` Raghavendra K T
2011-12-08  9:40                 ` Avi Kivity
2011-12-09 10:59                   ` Raghavendra K T
2011-12-07 16:31         ` Raghavendra K T
2011-11-30  9:00 ` [PATCH RFC V3 3/4] kvm guest : Added configuration support to enable debug information for KVM Guests Raghavendra K T
2011-11-30  9:00 ` [PATCH RFC V3 4/4] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor Raghavendra K T
2011-12-06  3:27   ` Konrad Rzeszutek Wilk
2011-12-06  6:54     ` Raghavendra K T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).