[PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-15 Thread Nikunj A Dadhania
QEMU assumes 32 memslots if this extension is not implemented. Although, current value of KVM_USER_MEM_SLOTS is 32, once KVM_USER_MEM_SLOTS changes QEMU would take a wrong value. Signed-off-by: Nikunj A Dadhania <nik...@linux.vnet.ibm.com> --- arch/powerpc/kvm/powerpc.c | 3 +++ 1 file c

[PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-15 Thread Nikunj A Dadhania
QEMU assumes 32 memslots if this extension is not implemented. Although, current value of KVM_USER_MEM_SLOTS is 32, once KVM_USER_MEM_SLOTS changes QEMU would take a wrong value. Signed-off-by: Nikunj A Dadhania <nik...@linux.vnet.ibm.com> --- arch/powerpc/kvm/powerpc.c | 3 +++ 1 file c

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-10-11 Thread Nikunj A Dadhania
On Wed, 10 Oct 2012 09:24:55 -0500, Andrew Theurer haban...@linux.vnet.ibm.com wrote: Below is again 8 x 20-way VMs, but this time I tried out Nikunj's gang scheduling patches. While I am not recommending gang scheduling, I think it's a good data point. The performance is 3.88x the PLE

Re: [PATCH v4 0/8] KVM paravirt remote flush tlb

2012-09-04 Thread Nikunj A Dadhania
On Tue, 04 Sep 2012 10:51:06 +0300, Avi Kivity a...@redhat.com wrote: On 09/04/2012 04:30 AM, Nikunj A Dadhania wrote: On Mon, 03 Sep 2012 17:33:46 +0300, Avi Kivity a...@redhat.com wrote: On 08/21/2012 02:25 PM, Nikunj A. Dadhania wrote: kernbench(lower is better

Re: [PATCH v4 0/8] KVM paravirt remote flush tlb

2012-09-03 Thread Nikunj A Dadhania
On Mon, 03 Sep 2012 17:33:46 +0300, Avi Kivity a...@redhat.com wrote: On 08/21/2012 02:25 PM, Nikunj A. Dadhania wrote: kernbench(lower is better) == base pvflushv4 %improvement 1VM48.5800 46.8513 3.55846 2VM 108.1823

Re: [PATCH v4 3/8] KVM Guest: Add VCPU running/pre-empted state for guest

2012-08-26 Thread Nikunj A Dadhania
On Fri, 24 Aug 2012 12:02:27 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Fri, Aug 24, 2012 at 11:09:39AM +0530, Nikunj A Dadhania wrote: On Thu, 23 Aug 2012 06:36:43 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Aug 21, 2012 at 04:56:35PM +0530, Nikunj A. Dadhania

Re: [PATCH v4 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-23 Thread Nikunj A Dadhania
On Thu, 23 Aug 2012 08:46:22 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Aug 21, 2012 at 04:56:43PM +0530, Nikunj A. Dadhania wrote: From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Hypervisor code to indicate guest running/pre-empteded status through msr. The page is now

Re: [PATCH v4 3/8] KVM Guest: Add VCPU running/pre-empted state for guest

2012-08-23 Thread Nikunj A Dadhania
On Thu, 23 Aug 2012 06:36:43 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Aug 21, 2012 at 04:56:35PM +0530, Nikunj A. Dadhania wrote: +void kvm_disable_vcpu_state(void) +{ + if (!has_vcpu_state) + return; + + wrmsr(MSR_KVM_VCPU_STATE, 0, 0); wrmsrl

[PATCH v4 0/8] KVM paravirt remote flush tlb

2012-08-21 Thread Nikunj A. Dadhania
/gmane.linux.kernel/1329752 --- Nikunj A. Dadhania (6): KVM Guest: Add VCPU running/pre-empted state for guest KVM-HV: Add VCPU running/pre-empted state for guest KVM Guest: Add paravirt kvm_flush_tlb_others KVM-HV: Add flush_on_enter before guest enter Enable HAVE_RCU_TABLE_FREE

[PATCH v4 1/8] mm, x86: Add HAVE_RCU_TABLE_FREE support

2012-08-21 Thread Nikunj A. Dadhania
- is part of PeterZ's Unify TLB gather implementations http://mid.gmane.org/20120627211540.459910...@chello.nl Cc: Nikunj A Dadhania nik...@linux.vnet.ibm.com Cc: Jeremy Fitzhardinge jer...@goop.org Cc: Avi Kivity a...@redhat.com Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl Link: http

[PATCH v4 2/8] mm: Add missing TLB invalidate to RCU page-table freeing

2012-08-21 Thread Nikunj A. Dadhania
is not NULL] Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/Kconfig |3 +++ arch/powerpc/Kconfig |1 + arch/sparc/Kconfig |1 + mm/memory.c | 43 +-- 4 files changed, 42 insertions(+), 6 deletions(-) diff

[PATCH v4 3/8] KVM Guest: Add VCPU running/pre-empted state for guest

2012-08-21 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com The patch adds guest code for msr between guest and hypervisor. The msr will export the vcpu running/pre-empted information to the guest from host. This will enable guest to intelligently send ipi to running vcpus and set flag for pre-empted

[PATCH v4 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-21 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Hypervisor code to indicate guest running/pre-empteded status through msr. The page is now pinned during MSR write time and use kmap_atomic/kunmap_atomic to access the shared area vcpu_state area. Suggested-by: Marcelo Tosatti mtosa

[PATCH v4 5/8] KVM Guest: Add paravirt kvm_flush_tlb_others

2012-08-21 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi as kvm_flush_tlb_others to further adapt to paravirtualization. Use the vcpu state information inside the kvm_flush_tlb_others to avoid sending ipi

[PATCH v4 6/8] KVM-HV: Add flush_on_enter before guest enter

2012-08-21 Thread Nikunj A. Dadhania
PV-Flush guest would indicate to flush on enter, flush the TLB before entering and exiting the guest. Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 28 1 files changed, 12 insertions(+), 16 deletions(-) diff --git a/arch/x86

[PATCH v4 7/8] Enable HAVE_RCU_TABLE_FREE for kvm when PARAVIRT_TLB_FLUSH is enabled

2012-08-21 Thread Nikunj A. Dadhania
Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/Kconfig | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c70684f..354160d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -612,6 +612,17

[PATCH v4 8/8] KVM-doc: Add paravirt tlb flush document

2012-08-21 Thread Nikunj A. Dadhania
Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- Documentation/virtual/kvm/msr.txt|4 ++ Documentation/virtual/kvm/paravirt-tlb-flush.txt | 53 ++ 2 files changed, 57 insertions(+), 0 deletions(-) create mode 100644 Documentation/virtual

Re: [PATCH v3 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-04 Thread Nikunj A Dadhania
On Fri, 3 Aug 2012 14:31:22 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Fri, Aug 03, 2012 at 11:25:44AM +0530, Nikunj A Dadhania wrote: On Thu, 2 Aug 2012 16:56:28 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: + case MSR_KVM_VCPU_STATE: + vcpu

Re: [PATCH v3 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-02 Thread Nikunj A Dadhania
On Thu, 2 Aug 2012 16:56:28 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 31, 2012 at 04:18:41PM +0530, Nikunj A. Dadhania wrote: From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Hypervisor code to indicate guest running/pre-empteded status through msr. The page is now

Re: [PATCH v3 6/8] KVM-HV: Add flush_on_enter before guest enter

2012-08-02 Thread Nikunj A Dadhania
On Thu, 2 Aug 2012 17:16:41 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Aug 02, 2012 at 05:14:02PM -0300, Marcelo Tosatti wrote: On Tue, Jul 31, 2012 at 04:19:02PM +0530, Nikunj A. Dadhania wrote: From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com static void

Re: [PATCH v3 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-02 Thread Nikunj A Dadhania
On Thu, 2 Aug 2012 16:56:28 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: + case MSR_KVM_VCPU_STATE: + vcpu-arch.v_state.vs_page = gfn_to_page(vcpu-kvm, data PAGE_SHIFT); + vcpu-arch.v_state.vs_offset = data ~(PAGE_MASK | KVM_MSR_ENABLED); Assign

Re: [PATCH v2 6/7] kvm,x86: RCU based table free

2012-08-01 Thread Nikunj A Dadhania
Hi Stefano, On Wed, 1 Aug 2012 12:23:37 +0100, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: On Tue, 5 Jun 2012, Stefano Stabellini wrote: On Tue, 5 Jun 2012, Peter Zijlstra wrote: On Tue, 2012-06-05 at 18:34 +0530, Nikunj A Dadhania wrote: PeterZ, is 7/7 alright

[PATCH v3 0/8] KVM paravirt remote flush tlb

2012-07-31 Thread Nikunj A. Dadhania
-tlb issue that we were trying to address using the paravirt-tlb-flush approach. [1] http://article.gmane.org/gmane.linux.kernel/1329752 --- Nikunj A. Dadhania (6): KVM Guest: Add VCPU running/pre-empted state for guest KVM-HV: Add VCPU running/pre-empted state for guest KVM Guest

[PATCH v3 1/8] mm, x86: Add HAVE_RCU_TABLE_FREE support

2012-07-31 Thread Nikunj A. Dadhania
- is part of PeterZ's Unify TLB gather implementations http://mid.gmane.org/20120627211540.459910...@chello.nl Cc: Nikunj A Dadhania nik...@linux.vnet.ibm.com Cc: Jeremy Fitzhardinge jer...@goop.org Cc: Avi Kivity a...@redhat.com Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl Link: http

[PATCH v3 3/8] KVM Guest: Add VCPU running/pre-empted state for guest

2012-07-31 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com The patch adds guest code for msr between guest and hypervisor. The msr will export the vcpu running/pre-empted information to the guest from host. This will enable guest to intelligently send ipi to running vcpus and set flag for pre-empted

[PATCH v3 5/8] KVM Guest: Add paravirt kvm_flush_tlb_others

2012-07-31 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi as kvm_flush_tlb_others to further adapt to paravirtualization. Use the vcpu state information inside the kvm_flush_tlb_others to avoid sending ipi

[PATCH v3 6/8] KVM-HV: Add flush_on_enter before guest enter

2012-07-31 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com PV-Flush guest would indicate to flush on enter, flush the TLB before entering and exiting the guest. Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 23 +++ 1 files changed, 7

[PATCH v3 2/8] mm: Add missing TLB invalidate to RCU page-table freeing

2012-07-31 Thread Nikunj A. Dadhania
of them need it. Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl Link: http://lkml.kernel.org/n/tip-z32nke0csqopykthsk1zj...@git.kernel.org [Fix to check *batch is not NULL] Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/Kconfig |3 +++ arch/powerpc/Kconfig

[PATCH v3 7/8] Enable HAVE_RCU_TABLE_FREE for kvm when PARAVIRT_TLB_FLUSH is enabled

2012-07-31 Thread Nikunj A. Dadhania
Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/Kconfig | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c70684f..354160d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -612,6 +612,17

[PATCH v3 8/8] KVM-doc: Add paravirt tlb flush document

2012-07-31 Thread Nikunj A. Dadhania
Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- Documentation/virtual/kvm/msr.txt|4 ++ Documentation/virtual/kvm/paravirt-tlb-flush.txt | 53 ++ 2 files changed, 57 insertions(+), 0 deletions(-) create mode 100644 Documentation/virtual

[PATCH v3 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-07-31 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Hypervisor code to indicate guest running/pre-empteded status through msr. The page is now pinned during MSR write time and use kmap_atomic/kunmap_atomic to access the shared area vcpu_state area. Suggested-by: Marcelo Tosatti mtosa

Re: [PATCH RFC 0/2] kvm: Improving directed yield in PLE handler

2012-07-12 Thread Nikunj A Dadhania
On Wed, 11 Jul 2012 14:04:03 +0300, Avi Kivity a...@redhat.com wrote: So this would probably improve guests that uses cpu_relax, for example stop_machine_run. I have no measurements, though. smp_call_function() too (though that can be converted to directed yield too). It seems

Re: [PATCH RFC 1/2] kvm vcpu: Note down pause loop exit

2012-07-12 Thread Nikunj A Dadhania
On Wed, 11 Jul 2012 16:22:29 +0530, Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On 07/11/2012 02:23 PM, Avi Kivity wrote: This adds some tiny overhead to vcpu entry. You could remove it by using the vcpu-requests mechanism to clear the flag, since vcpu-requests is already

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-06 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 04:55:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:37:24AM +0530, Nikunj A. Dadhania wrote: flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi as kvm_flush_tlb_others to further adapt

Re: [PATCH v2 5/7] KVM: Introduce PV kick in flush tlb

2012-07-05 Thread Nikunj A Dadhania
On Wed, 4 Jul 2012 23:37:46 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 03, 2012 at 01:55:02PM +0530, Nikunj A Dadhania wrote: On Tue, 3 Jul 2012 05:07:13 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:38:17AM +0530, Nikunj A. Dadhania wrote

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-04 Thread Nikunj A Dadhania
On Wed, 4 Jul 2012 23:09:10 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 03, 2012 at 01:49:49PM +0530, Nikunj A Dadhania wrote: On Tue, 3 Jul 2012 04:55:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: if (!zero_mask) goto again; Can you

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 04:55:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: if (!zero_mask) goto again; Can you please measure increased vmentry/vmexit overhead? x86/vmexit.c of git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git should help. Sure will get back with

Re: [PATCH v2 5/7] KVM: Introduce PV kick in flush tlb

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 05:07:13 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:38:17AM +0530, Nikunj A. Dadhania wrote: In place of looping continuously introduce a halt if we do not succeed after some time. For vcpus that were running an IPI is sent. In case

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 05:11:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:37:24AM +0530, Nikunj A. Dadhania wrote: arch/x86/include/asm/kvm_para.h |3 +- arch/x86/include/asm/tlbflush.h |9 ++ arch/x86/kernel/kvm.c |1 + arch/x86

Re: [PATCH v2 1/7] KVM Guest: Add VCPU running/pre-empted state for guest

2012-06-19 Thread Nikunj A Dadhania
On Tue, 12 Jun 2012 19:43:10 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:36:05AM +0530, Nikunj A. Dadhania wrote: The patch adds guest code for msr between guest and hypervisor. The msr will export the vcpu running/pre-empted information to the guest from

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-06-19 Thread Nikunj A Dadhania
Hi Marcelo, Thanks for the review. On Tue, 12 Jun 2012 20:02:18 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:37:24AM +0530, Nikunj A. Dadhania wrote: flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi

Re: [PATCH v2 6/7] kvm,x86: RCU based table free

2012-06-05 Thread Nikunj A Dadhania
On Tue, 5 Jun 2012 11:48:02 +0100, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: I am also interested in introducing HAVE_RCU_TABLE_FREE on x86 for Xen. Maybe we can pull our efforts together :-) Giving a look at this patch, it doesn't look like it is introducing

Re: [PATCH v2 6/7] kvm,x86: RCU based table free

2012-06-05 Thread Nikunj A Dadhania
On Tue, 5 Jun 2012 12:58:32 +0100, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: On Tue, 5 Jun 2012, Nikunj A Dadhania wrote: On Tue, 5 Jun 2012 11:48:02 +0100, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: I am also interested in introducing

[PATCH v2 0/7] KVM paravirt remote flush tlb

2012-06-03 Thread Nikunj A. Dadhania
and sysbench. Kernbench degraded further, PLE does help kernbench. This will be addressed by Raghu's directed yield approach. Comments/suggestions welcome. Regards Nikunj --- Nikunj A. Dadhania (6): KVM Guest: Add VCPU running/pre-empted state for guest KVM-HV: Add VCPU running/pre

[PATCH v2 2/7] KVM-HV: Add VCPU running/pre-empted state for guest

2012-06-03 Thread Nikunj A. Dadhania
Hypervisor code to indicate guest running/pre-empteded status through msr. Suggested-by: Peter Zijlstra a.p.zijls...@chello.nl Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_host.h |7 ++ arch/x86/kvm/cpuid.c|1 + arch/x86/kvm/x86

[PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-06-03 Thread Nikunj A. Dadhania
vcpus and set flush_on_enter flag * For online vcpus: Wait for them to clear the flag The approach was discussed here: https://lkml.org/lkml/2012/2/20/157 Suggested-by: Peter Zijlstra a.p.zijls...@chello.nl Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com -- Pseudo Algo: Write

[PATCH v2 4/7] KVM: export kvm_kick_vcpu for pv_flush

2012-06-03 Thread Nikunj A. Dadhania
Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_para.h |4 arch/x86/kernel/kvm.c | 18 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm

[PATCH v2 5/7] KVM: Introduce PV kick in flush tlb

2012-06-03 Thread Nikunj A. Dadhania
, this might result into something undesireable, i.e. It might clear the flush_mask of a new request. So after sending an IPI and waiting for a while, do a halt and wait for a kick from the last vcpu. Signed-off-by: Srivatsa Vaddagiri va...@linux.vnet.ibm.com Signed-off-by: Nikunj A. Dadhania nik

[PATCH v2 7/7] Flush page-table pages before freeing them

2012-06-03 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Certain architecture(viz. x86, arm, s390) have hardware page-table walkers(#PF). So during the RCU page-table teardown process make sure we do a tlb flush of page-table pages on all relevant CPUs to synchronize against hardware walkers

[PATCH v2 6/7] kvm,x86: RCU based table free

2012-06-03 Thread Nikunj A. Dadhania
disabled this will be delayed. http://article.gmane.org/gmane.linux.kernel/1290539 Tested-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/powerpc/include/asm/pgalloc.h |1 + arch/s390/mm/pgtable.c |1

[PATCH v2 1/7] KVM Guest: Add VCPU running/pre-empted state for guest

2012-06-03 Thread Nikunj A. Dadhania
that are not running. Suggested-by: Peter Zijlstra a.p.zijls...@chello.nl Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_para.h | 10 ++ arch/x86/kernel/kvm.c | 33 + 2 files changed, 43 insertions(+), 0 deletions

Re: [PATCH RFC V8 0/17] Paravirtualized ticket spinlocks

2012-05-13 Thread Nikunj A Dadhania
On Mon, 14 May 2012 00:15:30 +0530, Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On 05/07/2012 08:22 PM, Avi Kivity wrote: I could not come with pv-flush results (also Nikunj had clarified that the result was on NOn PLE Did you see any issues on PLE? Regards, Nikunj -- To

Re: KVM: Softlockups in guests while running kernbench

2012-05-11 Thread Nikunj A Dadhania
On Thu, 10 May 2012 20:16:26 +0530, Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: On Thu, 10 May 2012 15:39:04 +0530, Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: I had a discussion with Avi on IRC, he suggested running a trace on the host for the sched: tracepoints So when I

Re: KVM: Softlockups in guests while running kernbench

2012-05-10 Thread Nikunj A Dadhania
On Thu, 10 May 2012 15:39:04 +0530, Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: On Thu, 10 May 2012 12:22:00 +0300, Avi Kivity a...@redhat.com wrote: On 05/10/2012 11:15 AM, Nikunj A Dadhania wrote: I am running a 3.4.0-rc4 based kernel(commit: af3a3ab2), guest config attached

Re: [PATCH RFC V8 0/17] Paravirtualized ticket spinlocks

2012-05-08 Thread Nikunj A Dadhania
On Mon, 7 May 2012 22:42:30 +0200 (CEST), Thomas Gleixner t...@linutronix.de wrote: On Mon, 7 May 2012, Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: PS: Nikunj had experimented that pv-flush tlb + paravirt-spinlock is a win on PLE where only one of them alone could

Re: [RFC PATCH v1 3/5] KVM: Add paravirt kvm_flush_tlb_others

2012-05-06 Thread Nikunj A Dadhania
On Fri, 4 May 2012 17:14:49 +0530, Srivatsa Vaddagiri va...@linux.vnet.ibm.com wrote: * Nikunj A. Dadhania nik...@linux.vnet.ibm.com [2012-04-27 21:54:37]: @@ -1549,6 +1549,11 @@ static void kvm_set_vcpu_state(struct kvm_vcpu *vcpu) return; vs-state = 1; + if (vs

Re: [RFC PATCH v1 3/5] KVM: Add paravirt kvm_flush_tlb_others

2012-05-03 Thread Nikunj A Dadhania
On Wed, 02 May 2012 12:20:40 +0200, Peter Zijlstra pet...@infradead.org wrote: [...] diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index f96a5b5..8ca33e9 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -19,6 +19,8 @@ #include asm/pgalloc.h

Re: [RFC PATCH v1 3/5] KVM: Add paravirt kvm_flush_tlb_others

2012-05-02 Thread Nikunj A Dadhania
On Tue, 01 May 2012 11:39:36 +0200, Peter Zijlstra pet...@infradead.org wrote: On Sun, 2012-04-29 at 15:23 +0300, Avi Kivity wrote: On 04/27/2012 07:24 PM, Nikunj A. Dadhania wrote: flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi

Re: [RFC PATCH v1 3/5] KVM: Add paravirt kvm_flush_tlb_others

2012-05-02 Thread Nikunj A Dadhania
On Wed, 02 May 2012 12:20:40 +0200, Peter Zijlstra pet...@infradead.org wrote: On Wed, 2012-05-02 at 14:21 +0530, Nikunj A Dadhania wrote: [root@krm1 linux]# grep HAVE_RCU_TABLE .config CONFIG_HAVE_RCU_TABLE_FREE=y [root@krm1 linux]# make -j32 -s mm/memory.c: In function

Re: [RFC PATCH v1 1/5] KVM Guest: Add VCPU running/pre-empted state for guest

2012-04-30 Thread Nikunj A Dadhania
On Tue, 01 May 2012 06:33:59 +0530, Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On 04/27/2012 09:53 PM, Nikunj A. Dadhania wrote: The patch adds guest code for msr between guest and hypervisor. The msr will export the vcpu running/pre-empted information to the guest from host

Re: [RFC PATCH v1 3/5] KVM: Add paravirt kvm_flush_tlb_others

2012-04-30 Thread Nikunj A Dadhania
On Sun, 29 Apr 2012 15:23:16 +0300, Avi Kivity a...@redhat.com wrote: On 04/27/2012 07:24 PM, Nikunj A. Dadhania wrote: flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi as kvm_flush_tlb_others to further adapt to paravirtualization. Use

[RFC PATCH v1 0/5] KVM paravirt remote flush tlb

2012-04-27 Thread Nikunj A. Dadhania
--- Nikunj A. Dadhania (5): KVM Guest: Add VCPU running/pre-empted state for guest KVM-HV: Add VCPU running/pre-empted state for guest KVM: Add paravirt kvm_flush_tlb_others KVM: export kvm_kick_vcpu for pv_flush KVM: Introduce PV kick in flush tlb arch/x86/include/asm

[RFC PATCH v1 2/5] KVM-HV: Add VCPU running/pre-empted state for guest

2012-04-27 Thread Nikunj A. Dadhania
Hypervisor code to indicate guest running/pre-empteded status through msr. Suggested-by: Peter Zijlstra a.p.zijls...@chello.nl Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_host.h |7 ++ arch/x86/kvm/cpuid.c|1 + arch/x86/kvm/x86

[RFC PATCH v1 1/5] KVM Guest: Add VCPU running/pre-empted state for guest

2012-04-27 Thread Nikunj A. Dadhania
that are not running. Suggested-by: Peter Zijlstra a.p.zijls...@chello.nl Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_para.h | 10 ++ arch/x86/kernel/kvm.c | 33 + 2 files changed, 43 insertions(+), 0 deletions

[RFC PATCH v1 3/5] KVM: Add paravirt kvm_flush_tlb_others

2012-04-27 Thread Nikunj A. Dadhania
vcpus and set flush_on_enter flag * For online vcpus: Wait for them to clear the flag The approach was discussed here: https://lkml.org/lkml/2012/2/20/157 Suggested-by: Peter Zijlstra a.p.zijls...@chello.nl Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com -- Pseudo Algo: Write

[RFC PATCH v1 4/5] KVM: get kvm_kick_vcpu out for pv_flush

2012-04-27 Thread Nikunj A. Dadhania
Get kvm_kick_cpu out of CONFIG_PARAVIRT_SPINLOCK define Signed-off-by: Nikunj A. Dadhania nik...@linux.vnet.ibm.com --- arch/x86/kernel/kvm.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 66db54e

[RFC PATCH v1 5/5] KVM: Introduce PV kick in flush tlb

2012-04-27 Thread Nikunj A. Dadhania
, this might result into something undesireable, i.e. It might clear the flush_mask of a new request. So after sending an IPI and waiting for a while, do a halt and wait for a kick from the last vcpu. Signed-off-by: Srivatsa Vaddagiri va...@linux.vnet.ibm.com Signed-off-by: Nikunj A. Dadhania nik