[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 --- arch/powerpc/kvm/powerpc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

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 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 result. > > https://docs.g

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 wrote: > On 09/04/2012 04:30 AM, Nikunj A Dadhania wrote: > > On Mon, 03 Sep 2012 17:33:46 +0300, Avi Kivity wrote: > >> On 08/21/2012 02:25 PM, Nikunj A. Dadhania wrote: > >> > &g

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 wrote: > On 08/21/2012 02:25 PM, Nikunj A. Dadhania wrote: > > > > kernbench(lower is better) > > == > > base pvflushv4 %improvement > > 1VM48.5800 46.8513

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 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 > > wrote: > > > On Tue, Aug 21, 2012 at 04:56:35PM +0530, Nikunj A. Dadhania wrote:

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 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; > > + > > + wrm

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 wrote: > On Tue, Aug 21, 2012 at 04:56:43PM +0530, Nikunj A. Dadhania wrote: > > From: Nikunj A. Dadhania > > > > Hypervisor code to indicate guest running/pre-empteded status through > > msr. The page is now pinne

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

2012-08-21 Thread Nikunj A. Dadhania
Signed-off-by: Nikunj A. Dadhania --- 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/kvm/paravirt-tlb

[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 --- 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 @@ config

[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 --- arch/x86/kvm/x86.c | 28 1 files changed, 12 insertions(+), 16 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm

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

2012-08-21 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania 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 to pre-empted vcpus. * Do

[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 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 Signed-off-by: Nikunj A. Dadhania

[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 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 vcpus. This will prevent

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

2012-08-21 Thread Nikunj A. Dadhania
em need it. Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-z32nke0csqopykthsk1zj...@git.kernel.org Not for inclusion - is part of PeterZ's "Unify TLB gather implementations" http://mid.gmane.org/20120627211540.459910...@chello.nl [Fix to check *batch is not NULL

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

2012-08-21 Thread Nikunj A. Dadhania
x27;s "Unify TLB gather implementations" http://mid.gmane.org/20120627211540.459910...@chello.nl Cc: Nikunj A Dadhania Cc: Jeremy Fitzhardinge Cc: Avi Kivity Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-r106wg6t7crxxhva55jna...@git.kernel.org --- arch/x86/include/a

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

2012-08-21 Thread Nikunj A. Dadhania
ticle.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: Add paravirt kvm_flush_tlb_others KVM-HV: Add flush_on_enter before guest enter Enable HAVE_RCU

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 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 > > wrote: > > > > > > > > + case MSR_KVM_VCPU_STATE: > > &

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 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 vs_o

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 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 > > > > > > static void kvm_

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 wrote: > On Tue, Jul 31, 2012 at 04:18:41PM +0530, Nikunj A. Dadhania wrote: > > From: Nikunj A. Dadhania > > > > Hypervisor code to indicate guest running/pre-empteded status through > > msr. The page is now pinne

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 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 t

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

2012-07-31 Thread Nikunj A. Dadhania
Signed-off-by: Nikunj A. Dadhania --- 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/kvm/paravirt-tlb

[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 --- 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 @@ config

[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 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 Signed-off-by: Nikunj A. Dadhania

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

2012-07-31 Thread Nikunj A. Dadhania
From: 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 --- arch/x86/kvm/x86.c | 23 +++ 1 files changed, 7 insertions(+), 16 deletions(-) diff --git a/arch/x86/kvm

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

2012-07-31 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania 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 to pre-empted vcpus. * Do

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

2012-07-31 Thread Nikunj A. Dadhania
em need it. Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-z32nke0csqopykthsk1zj...@git.kernel.org [Fix to check *batch is not NULL] Signed-off-by: Nikunj A. Dadhania --- arch/Kconfig |3 +++ arch/powerpc/Kconfig |1 + arch/sparc/Kconfig |1 + mm/memory.c

[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 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 vcpus. This will prevent

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

2012-07-31 Thread Nikunj A. Dadhania
x27;s "Unify TLB gather implementations" http://mid.gmane.org/20120627211540.459910...@chello.nl Cc: Nikunj A Dadhania Cc: Jeremy Fitzhardinge Cc: Avi Kivity Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-r106wg6t7crxxhva55jna...@git.kernel.org --- arch/x86/include/a

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

2012-07-31 Thread Nikunj A. Dadhania
ave addressed the remote-flush-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 s

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 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 checked on every entry.

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 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 worthwhile. > Wi

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 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 to > &g

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

2012-07-04 Thread Nikunj A Dadhania
On Wed, 4 Jul 2012 23:37:46 -0300, Marcelo Tosatti 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 > > 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 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 > > wrote: > > > > > > > >if (!zero_mask) > > > >

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 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 + &g

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 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

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 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 the resu

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

2012-06-18 Thread Nikunj A Dadhania
Hi Marcelo, Thanks for the review. On Tue, 12 Jun 2012 20:02:18 -0300, Marcelo Tosatti 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_flus

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

2012-06-18 Thread Nikunj A Dadhania
On Tue, 12 Jun 2012 19:43:10 -0300, Marcelo Tosatti 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 >

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

2012-06-05 Thread Nikunj A Dadhania
On Tue, 05 Jun 2012 15:08:08 +0200, Peter Zijlstra wrote: > On Tue, 2012-06-05 at 18:34 +0530, Nikunj A Dadhania wrote: > > PeterZ, is 7/7 alright to be picked? > > Yeah, I guess it is.. I haven't had time to rework my tlb series yet > though. But these two patches toget

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 wrote: > On Tue, 5 Jun 2012, Nikunj A Dadhania wrote: > > On Tue, 5 Jun 2012 11:48:02 +0100, Stefano Stabellini > > wrote: > > > > > > I am also interested in introducing HAVE_RCU_TABLE_FREE on x86 for

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 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 > CONFIG_HAVE_RCU_TABLE_FREE anywhere und

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

2012-06-03 Thread Nikunj A. Dadhania
running. Suggested-by: Peter Zijlstra Signed-off-by: Nikunj A. Dadhania --- arch/x86/include/asm/kvm_para.h | 10 ++ arch/x86/kernel/kvm.c | 33 + 2 files changed, 43 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/kvm_para.h

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

2012-06-03 Thread Nikunj A. Dadhania
ll be delayed. http://article.gmane.org/gmane.linux.kernel/1290539 Tested-by: Nikunj A. Dadhania Signed-off-by: Nikunj A. Dadhania --- arch/powerpc/include/asm/pgalloc.h |1 + arch/s390/mm/pgtable.c |1 + arch/sparc/include/asm/pgalloc_64.h |1 + arch/x86/mm/pgta

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

2012-06-03 Thread Nikunj A. Dadhania
From: Nikunj A. Dadhania 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, and then free the pages. Moreover

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

2012-06-03 Thread Nikunj A. Dadhania
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 Signed-off-by: Nikunj A. Dadhania --- arch/x86/mm/tlb.c | 25

[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 --- 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/kvm_para.h index 684a285..651a305

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

2012-06-03 Thread Nikunj A. Dadhania
fline 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 Signed-off-by: Nikunj A. Dadhania -- Pseudo Algo: Write() == guest

[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 Signed-off-by: Nikunj A. Dadhania --- arch/x86/include/asm/kvm_host.h |7 ++ arch/x86/kvm/cpuid.c|1 + arch/x86/kvm/x86.c | 45

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

2012-06-03 Thread Nikunj A. Dadhania
hackbench 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 V

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 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 unsubscribe from this list: send

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 wrote: > On Thu, 10 May 2012 15:39:04 +0530, Nikunj A Dadhania > wrote: > > I had a discussion with Avi on IRC, he suggested running a trace on the > host for the sched: tracepoints > > So when I see the console of

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 wrote: > On Thu, 10 May 2012 12:22:00 +0300, Avi Kivity 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 wrote: > On Mon, 7 May 2012, Ingo Molnar wrote: > > * Avi Kivity wrote: > > > > > > PS: Nikunj had experimented that pv-flush tlb + > > > > paravirt-spinlock is a win on PLE where only one of them > > > > alone could not prove the bene

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 wrote: > * Nikunj A. Dadhania [2012-04-27 21:54:37]: > > > @@ -1549,6 +1549,11 @@ static void kvm_set_vcpu_state(struct kvm_vcpu *vcpu) > > return; > > > > vs->state =

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 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 > #include > > +static inli

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 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 fun

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 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_

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 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.

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 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. This

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

2012-04-27 Thread Nikunj A. Dadhania
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 Signed-off-by: Nikunj A. Dadhania --- arch/x86/mm/tlb.c | 27

[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 --- 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..5943285 100644 --- a/arch

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

2012-04-27 Thread Nikunj A. Dadhania
fline 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 Signed-off-by: Nikunj A. Dadhania -- Pseudo Algo: Write() == guest

[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 Signed-off-by: Nikunj A. Dadhania --- arch/x86/include/asm/kvm_host.h |7 ++ arch/x86/kvm/cpuid.c|1 + arch/x86/kvm/x86.c | 44

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

2012-04-27 Thread Nikunj A. Dadhania
running. Suggested-by: Peter Zijlstra Signed-off-by: Nikunj A. Dadhania --- arch/x86/include/asm/kvm_para.h | 10 ++ arch/x86/kernel/kvm.c | 33 + 2 files changed, 43 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/kvm_para.h

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

2012-04-27 Thread Nikunj A. Dadhania
3/123 --- 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/includ