From: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
To: Greg Kroah-Hartman <gregkh@suse.de>,
Sedat Dilek <sedat.dilek@gmail.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
KVM <kvm@vger.kernel.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Dave Jiang <dave.jiang@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Marcelo Tosatti <mtosatti@redhat.com>,
Yinghai Lu <yinghai@kernel.org>, Gleb Natapov <gleb@redhat.com>,
Ingo Molnar <mingo@redhat.com>, Avi Kivity <avi@redhat.com>,
Xen <xen-devel@lists.xensource.com>,
Virtualization <virtualization@lists.linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
Sasha Levin <levinsasha928@gmail.com>,
Suzuki Poulose <suzuki@linux.vnet.ibm.com>,
Dave Hansen <dave@linux.vnet.ibm.com>
Subject: [PATCH RFC V3 0/4] kvm : Paravirt-spinlock support for KVM guests
Date: Wed, 30 Nov 2011 14:29:21 +0530 [thread overview]
Message-ID: <20111130085921.23386.89708.sendpatchset@oc5400248562.ibm.com> (raw)
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(-)
next reply other threads:[~2011-11-30 8:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 8:59 Raghavendra K T [this message]
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-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111130085921.23386.89708.sendpatchset@oc5400248562.ibm.com \
--to=raghavendra.kt@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=dave.jiang@intel.com \
--cc=dave@linux.vnet.ibm.com \
--cc=gleb@redhat.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=sedat.dilek@gmail.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=suzuki@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=vatsa@linux.vnet.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®