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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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:
> > &
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
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_
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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:
>
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)
> > > >
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
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
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
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
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
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
>
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
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 =
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
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
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_
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.
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
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
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
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
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
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
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
67 matches
Mail list logo