2015-11-26 16:34 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>:
>
>
> On 11/26/2015 08:28 AM, Wanpeng Li wrote:
>>
>> 2015-11-25 23:20 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>:
>>>
>>> Per Hyper-V specification (and as required
2015-11-26 16:34 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>:
>
>
> On 11/26/2015 08:28 AM, Wanpeng Li wrote:
>>
>> 2015-11-25 23:20 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>:
>>>
>>> Per Hyper-V specification (and as required
format message
> to the configured SynIC message slot and triggering the corresponding
> synthetic interrupt.
Could you post a link for this specification?
Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.o
w/
32-bit guest, vmware also exposes LM bit to 32 bit guest(however it
doesn't expose syscall/sysret), so maybe we can't depend on F(LM).
Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
Mor
2015-11-19 19:05 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>:
>
>
> On 19/11/2015 11:45, Wanpeng li wrote:
>> Intel cpu doesn't support syscall/sysret in non 64-bit mode which
>> is different from AMD. Expose syscall/sysret to intel 32-bit guest
>> just make
2015-11-20 10:52 GMT+08:00 Wanpeng Li <kernel...@gmail.com>:
> Hi Paolo,
> 2015-02-09 17:03 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>:
>> NoWrite instructions (e.g. cmp or test) never set the "write access"
>> bit in the error code, even if one of the
could you point out where in SDM
describe above?
Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
> + test_rdtscp(0);
> + test_rdtscp(10);
> + test_rdtscp(0x100);
> + } else
> + printf("rdtscp not supported\n");
> return 0;
> }
> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
> index
{
> + test_rdtscp(0);
> + test_rdtscp(10);
> + test_rdtscp(0x100);
> + } else
> + printf("rdtscp not supported\n");
> return 0;
> }
> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
> ind
can you send v2 that
> removes or modifies the existing call to vmcs_writel? If there is a
> bug, can you write a unit test for it? It should be possible to test
> for the problem using INIT+SIPI on an AP.
You are right, I write a INIT+SIPI kvm-unit-test and didn't trigger
any bug. Please ig
reset eflags register to 0002H following initialization
of the processor.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
v1 -> v2:
* use vmcs_writel
arch/x86/kvm/vmx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b680c2e
(with 2:1 cpu overcommit). irq time accounting gets crazy. Even 'top'
shows weird statistic: 50% hi, 50% st, ~0% user, spinning processes
use ~0% cpu - that is not correct.
If this is the desired behavior or something need to improve?
Regards,
Wanpeng Li
--
To unsubscribe from this list: send
Ping, :-)
On 10/21/15 2:28 PM, Wanpeng Li wrote:
Reference SDM 3.4.3:
Following initialization of the processor (either by asserting the
RESET pin or the INIT pin), the state of the EFLAGS register is
0002H.
However, the eflags fixed bit is not set and other bits are also not
cleared
On 10/21/15 2:46 PM, Paolo Bonzini wrote:
On 21/10/2015 00:57, Wanpeng Li wrote:
kvm_sched_out and kvm_sched_in are part of KVM's preemption hooks. The
hooks are registered only between vcpu_load and vcpu_put, therefore they
know that the mutex is taken. The sequence will go like
it by set eflags register to 0002H following
initialization of the processor.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b680c2e..326f6ea 100644
--- a/arch/x86/kvm
_sched_out
...
vcpu_put
Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
rse. It prefers to stuck at quarters (100% 75% 50% 25%)
Output is attached.
If the output in attachment is for VM2 only?
Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vg
Ping, :-)
On 10/14/15 12:12 AM, Wanpeng Li wrote:
v2 -> v3:
* separate nested_vmx_vpid_caps and move checks to patch 3/5,
only rejoin them when reading the MSR.
v1 -> v2:
* set bit 32 of the VMX_EPT_VPID_CAP MSR
* check against the supported types in the implemen
vCPUs not sched in/out on L1.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 2a54cc7..0b
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Reviewed-by: Jan Kiszka <jan.kis...@siemens.com>
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Wanpeng Li (5):
KVM: VMX: adjust interface to allocate/free_vpid
KVM: VMX: introduce __vmx_flush_tlb to handle specific vpid
KVM: nVMX: emulate the INVVPID instruction
KVM: nVMX: nested VPID emu
Add the INVVPID instruction emulation.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/include/asm/vmx.h | 1 +
arch/x86/kvm/vmx.c | 61 +-
2 files changed, 61 inse
m>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 1a0e336..d21b9a6 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1392
Adjust allocate/free_vid so that they can be reused for the nested vpid.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff
On 10/13/15 10:44 PM, Paolo Bonzini wrote:
On 08/10/2015 07:57, Wanpeng Li wrote:
Expose VPID capability to L1. For nested guests, we don't do anything
specific for single context invalidation. Hence, only advertise support
for global context invalidation. The major benefit of nested VPID
On 9/29/15 6:39 PM, Paolo Bonzini wrote:
On 29/09/2015 04:55, Wanpeng Li wrote:
Expose VPID capability to L1.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
v1 -> v2:
* set only VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT
Thanks. I've checked more thoroughly your implementatio
Adjust allocate/free_vid so that they can be reused for the nested vpid.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff
m>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 3c9e2a4a..215db2b 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1337
xsw ctxsw ctxsw ctxsw
- - -- -- -- -- -- --- ---
kernelLinux 3.5.0-1 1.2200 1.3700 1.4500 4.7800 2.3300 5.6 2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Wanpeng Li (5):
KVM:
vCPUs not sched in/out on L1.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 36
1 file changed, 24 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Reviewed-by: Jan Kiszka <jan.kis...@siemens.com>
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/
Add the INVVPID instruction emulation.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/include/asm/vmx.h | 3 +++
arch/x86/kvm/vmx.c | 49 +-
2 files changed, 51 inse
Expose VPID capability to L1.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
v1 -> v2:
* set only VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT
arch/x86/kvm/vmx.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/
On 9/29/15 6:39 PM, Paolo Bonzini wrote:
On 29/09/2015 04:55, Wanpeng Li wrote:
Expose VPID capability to L1.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
v1 -> v2:
* set only VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT
Thanks. I've checked more thoroughly your implementatio
On 9/28/15 8:05 PM, Paolo Bonzini wrote:
On 24/09/2015 08:51, Wanpeng Li wrote:
/*
* For nested guests, we don't do anything specific
* for single context invalidation. Hence, only advertise
* support for global context
Expose VPID capability to L1.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f9219ad..866045c 100644
--- a/arch/x86/kvm
On 9/25/15 12:12 AM, Bandan Das wrote:
Wanpeng Li <wanpeng...@hotmail.com> writes:
Introduce __vmx_flush_tlb() to handle specific vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 21 +
1 file changed, 13 insertions(+),
On 9/23/15 4:39 PM, Paolo Bonzini wrote:
On 23/09/2015 09:59, Wanpeng Li wrote:
Add the INVVPID instruction emulation.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/include/asm/vmx.h | 1 +
arch/x86/kvm/vmx.c
Introduce __vmx_flush_tlb() to handle specific vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 794c529..7188c5e
vpid_sync_vcpu_single() still handles vpid01 during nested
vmentry/vmexit since vmx->vpid is used for invvpid. This
patch fix it by specific the vpid02 through __vmx_flush_tlb()
to flush the right vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 4 ++-
Add the INVVPID instruction emulation.
Reviewed-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/include/asm/vmx.h | 1 +
arch/x86/kvm/vmx.c | 23 ++-
2 files changed, 23 insertions(+), 1 deletion(-)
On 9/21/15 10:51 AM, Xiao Guangrong wrote:
Thanks for your report and analysis, Janusz!
On 09/19/2015 01:48 AM, Janusz wrote:
W dniu 18.09.2015 o 12:07, Laszlo Ersek pisze:
On 09/18/15 11:37, Janusz wrote:
Hello,
I am writting about this patch that was posted by Xiao:
On 9/16/15 1:20 PM, Jan Kiszka wrote:
On 2015-09-16 04:36, Wanpeng Li wrote:
On 9/16/15 1:32 AM, Jan Kiszka wrote:
On 2015-09-15 12:14, Wanpeng Li wrote:
On 9/14/15 10:54 PM, Jan Kiszka wrote:
Last but not least: the guest can now easily exhaust the host's pool of
vpid by simply spawning
On 9/16/15 5:11 PM, Jan Kiszka wrote:
On 2015-09-16 09:19, Wanpeng Li wrote:
Enhance allocate/free_vid to handle shadow vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff
Enhance allocate/free_vid to handle shadow vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9ff6a3f..f8d704d
2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Reviewed-by: Jan Kiszka <jan.kis...@siemens.com>
Suggested-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/
0 2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Wanpeng Li (2):
KVM: nVMX: enhance allocate/free_vpid to handle shadow vpid
KVM: nVMX: nested VPID emulation
arch/x86/kvm/vmx.c | 60 ++---
Enhance allocate/free_vid to handle shadow vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9ff6a3f..c5222b8
On 9/16/15 2:42 PM, Jan Kiszka wrote:
On 2015-09-16 05:51, Wanpeng Li wrote:
Enhance allocate/free_vid to handle shadow vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 24 +++-
1 file changed, 11 insertions(+), 13 deletions(-)
.2200 1.3700 1.4500 4.7800 2.3300 5.6 2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Wanpeng Li (2):
KVM: nVMX: enhance allocate/free_vpid to handle shadow vpid
KVM: nVMX: nested VPID emulation
arch/x86/kv
2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Reviewed-by: Jan Kiszka <jan.kis...@siemens.com>
Suggested-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/
On 9/16/15 6:04 PM, Paolo Bonzini wrote:
On 16/09/2015 11:30, Wanpeng Li wrote:
Enhance allocate/free_vid to handle shadow vpid.
Adjusting the commit message:
KVM: nVMX: adjust interface to allocate/free_vpid
Adjust allocate/free_vid so that they can be reused for the nested
0H for VMX root operation.
This patch fix it by reintroducing reserve H for VMX root operation.
Reported-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x8
y.
If this can be reproduced on x86 platform?
Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
while the value of
Looks good to me.
Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 9/15/15 8:54 PM, Paolo Bonzini wrote:
On 15/09/2015 12:30, Wanpeng Li wrote:
+ if (!nested) {
+ vpid = find_first_zero_bit(vmx_vpid_bitmap, VMX_NR_VPIDS);
+ if (vpid < VMX_NR_VPIDS) {
vmx->vpid = vpid;
__set_bi
Enhance allocate/free_vid to handle shadow vpid.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 24 +++-
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9ff6a3f..4956081
12.9 3.49000 7.46000
vanilla
Wanpeng Li (2):
KVM: nVMX: enhance allocate/free_vpid to handle shadow vpid
KVM: nVMX: nested VPID emulation
arch/x86/kvm/vmx.c | 61 +-
1 file changed, 42 insertions(+), 19 deletions(-)
--
2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Suggested-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 37 +++--
1 file
On 9/16/15 1:32 AM, Jan Kiszka wrote:
On 2015-09-15 12:14, Wanpeng Li wrote:
On 9/14/15 10:54 PM, Jan Kiszka wrote:
Last but not least: the guest can now easily exhaust the host's pool of
vpid by simply spawning plenty of VCPUs for L2, no? Is this acceptable
or should there be some limit?
I
On 9/16/15 6:00 AM, David Matlack wrote:
On Tue, Sep 15, 2015 at 12:04 AM, Oliver Yang wrote:
Hi Guys,
I found below patch for KVM TSC trapping / migration support,
https://lkml.org/lkml/2011/1/6/90
It seemed the patch were not merged in Linux mainline.
So I have 3
On 9/14/15 10:54 PM, Jan Kiszka wrote:
On 2015-09-14 14:52, Wanpeng Li wrote:
VPID is used to tag address space and avoid a TLB flush. Currently L0 use
the same VPID to run L1 and all its guests. KVM flushes VPID when switching
between L1 and L2.
This patch advertises VPID to the L1 hypervisor
On 9/15/15 12:08 AM, Bandan Das wrote:
Wanpeng Li <wanpeng...@hotmail.com> writes:
VPID is used to tag address space and avoid a TLB flush. Currently L0 use
the same VPID to run L1 and all its guests. KVM flushes VPID when switching
between L1 and L2.
This patch advertises VPID to
xsw
- - -- -- -- -- -- --- ---
kernelLinux 3.5.0-1 1.2200 1.3700 1.4500 4.7800 2.3300 5.6 2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Wanpeng Li (2):
KVM: nVMX: enhance allocate/free_v
2.88000
nested VPID
kernelLinux 3.5.0-1 1.2600 1.4300 1.5600 12.7 12.9 3.49000 7.46000
vanilla
Suggested-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 25 ++---
1 file changed, 18 inse
Enhance allocate/free_vid to handle shadow vpid.
Suggested-by: Wincy Van <fanwenyi0...@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 33 +++--
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/arch/x86
flush when swithing between L1 and
L2. This patch gets ~3x performance improvement for lmbench 8p/64k ctxsw.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
arch/x86/kvm/vmx.c | 39 ---
1 file changed, 32 insertions(+), 7 deletions(-)
diff --git a/ar
hen polling is disabled.
Reported-by: Christian Borntraeger <borntrae...@de.ibm.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
virt/kvm/kvm_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 4662a88..
On 9/10/15 3:13 PM, Christian Borntraeger wrote:
Am 10.09.2015 um 03:55 schrieb Wanpeng Li:
On 9/9/15 9:39 PM, Christian Borntraeger wrote:
Am 03.09.2015 um 16:07 schrieb Wanpeng Li:
v6 -> v7:
* explicit signal (set a bool)
* fix the tracepoint
v5 -> v6:
* fix wait_ns and p
On 9/9/15 9:39 PM, Christian Borntraeger wrote:
Am 03.09.2015 um 16:07 schrieb Wanpeng Li:
v6 -> v7:
* explicit signal (set a bool)
* fix the tracepoint
v5 -> v6:
* fix wait_ns and poll_ns
v4 -> v5:
* set base case 10us and max poll time 500us
* handle short/long halt,
On 9/6/15 10:32 PM, Paolo Bonzini wrote:
On 05/09/2015 00:38, Wanpeng Li wrote:
@@ -1940,11 +1975,16 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
* arrives.
*/
if (kvm_vcpu_check_block(vcpu) < 0) {
+polled = t
Hi Paolo,
On 9/3/15 10:07 PM, Wanpeng Li wrote:
[...]
static int kvm_vcpu_check_block(struct kvm_vcpu *vcpu)
{
if (kvm_arch_vcpu_runnable(vcpu)) {
@@ -1928,7 +1962,8 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
{
ktime_t start, cur;
DEFINE_WAIT(wait);
- bool
save some indentation.
Then we will miss the tracepoint.
Regards,
Wanpeng Li
+ if (block_ns <= vcpu->halt_poll_ns)
+ ;
+ /* we had a long block, shrink polling */
+ else if (vcpu->halt_poll_ns && block_ns >
loop calling
kvm_vcpu_block and starve the waiting task (at least until need_resched()),
which would break the "only hog the cpu when idle" aspect of halt-polling.
That's definitely a bug, yes.
Ok, I will send out v7 to fix this in this sunday since there is
vacation in my country currently
On 9/4/15 12:07 AM, David Matlack wrote:
On Thu, Sep 3, 2015 at 2:23 AM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
How about something like:
@@ -1941,10 +1976,14 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
*/
if (kvm_vcpu_check_bloc
Suggested-by: David Matlack <dmatl...@google.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
virt/kvm/kvm_main.c | 63 +
1 file changed, 59 insertions(+), 4 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
sing the dynamic-poll. The savings
should be even higher for higher frequency ticks.
Wanpeng Li (3):
KVM: make halt_poll_ns per-vCPU
KVM: dynamic halt-polling
KVM: trace kvm_halt_poll_ns grow/shrink
include/linux/kvm_host.h | 1 +
include/trace/eve
Change halt_poll_ns into per-VCPU variable, seeded from module parameter,
to allow greater flexibility.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff
Tracepoint for dynamic halt_pool_ns, fired on every potential change.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
include/trace/events/kvm.h | 30 ++
virt/kvm/kvm_main.c| 8 ++--
2 files changed, 36 insertions(+), 2 deletions(-)
diff
On 9/3/15 2:09 AM, David Matlack wrote:
On Wed, Sep 2, 2015 at 12:29 AM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
There is a downside of always-poll since poll is still happened for idle
vCPUs which can waste cpu usage. This patch adds the ability to adjust
halt_poll_ns dynamically, t
On 9/4/15 9:16 AM, Wanpeng Li wrote:
[...]
+
static int kvm_vcpu_check_block(struct kvm_vcpu *vcpu)
{
if (kvm_arch_vcpu_runnable(vcpu)) {
@@ -1929,6 +1963,7 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
ktime_t start, cur;
DEFINE_WAIT(wait);
bool waited
On 9/2/15 9:49 AM, David Matlack wrote:
On Tue, Sep 1, 2015 at 5:29 PM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
On 9/2/15 7:24 AM, David Matlack wrote:
On Tue, Sep 1, 2015 at 3:58 PM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
Why this can happen?
Ah, probably because
The savings
should be even higher for higher frequency ticks.
Wanpeng Li (3):
KVM: make halt_poll_ns per-VCPU
KVM: dynamic halt_poll_ns adjustment
KVM: trace kvm_halt_poll_ns grow/shrink
include/linux/kvm_host.h | 1 +
include/trac
frequency ticks.
Suggested-by: David Matlack <dmatl...@google.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
virt/kvm/kvm_main.c | 60 ++---
1 file changed, 57 insertions(+), 3 deletions(-)
diff --git a/virt/kvm
Tracepoint for dynamic halt_pool_ns, fired on every potential change.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
include/trace/events/kvm.h | 30 ++
virt/kvm/kvm_main.c| 8 ++--
2 files changed, 36 insertions(+), 2 deletions(-)
diff
Tracepoint for dynamic halt_pool_ns, fired on every potential change.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
include/trace/events/kvm.h | 30 ++
virt/kvm/kvm_main.c| 8 ++--
2 files changed, 36 insertions(+), 2 deletions(-)
diff
Change halt_poll_ns into per-vCPU variable, seeded from module parameter,
to allow greater flexibility.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff
less. (250HZ) means the guest was ticking at 250HZ.
The big win is with ticking operating systems. Running the linux guest
with nohz=off (and HZ=250), we save 3.4%~12.8% CPUs/second and get close
to no-polling overhead levels by using the dynamic-poll. The savings
should be even higher for higher fre
Suggested-by: David Matlack <dmatl...@google.com>
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
virt/kvm/kvm_main.c | 61 ++---
1 file changed, 58 insertions(+), 3 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kv
Change halt_poll_ns into per-vCPU variable, seeded from module parameter,
to allow greater flexibility.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff
On 9/3/15 2:09 AM, David Matlack wrote:
On Wed, Sep 2, 2015 at 12:42 AM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
Tracepoint for dynamic halt_pool_ns, fired on every potential change.
Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com>
---
include/trace/event
On 9/2/15 7:24 AM, David Matlack wrote:
On Tue, Sep 1, 2015 at 3:58 PM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
On 9/2/15 6:34 AM, David Matlack wrote:
On Tue, Sep 1, 2015 at 3:30 PM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
On 9/2/15 5:45 AM, David Matlack wrote:
On Thu,
On 9/2/15 6:34 AM, David Matlack wrote:
On Tue, Sep 1, 2015 at 3:30 PM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
On 9/2/15 5:45 AM, David Matlack wrote:
On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li <wanpeng...@hotmail.com>
wrote:
v3 -> v4:
* bring back grow vcpu->
On 9/2/15 5:45 AM, David Matlack wrote:
On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li <wanpeng...@hotmail.com> wrote:
v3 -> v4:
* bring back grow vcpu->halt_poll_ns when interrupt arrives and shrinks
when idle VCPU is detected
v2 -> v3:
* grow/shrink vcp
On 8/31/15 3:44 PM, Wanpeng Li wrote:
On 8/30/15 6:26 AM, Peter Kieser wrote:
Thanks, Wanpeng. Applied this to Linux 3.18 and seeing much higher CPU
usage (200%) for qemu 2.4.0 process on a Windows 10 x64 guest. qemu
parameters:
Interesting. I test this against latest kvm tree and stable qemu
% |
+-++---+
Regards,
Wanpeng Li
qemu-system-x86_64 -enable-kvm -name arwan-20150704 -S -machine
pc-q35-2.2,accel=kvm,usb=off -cpu
Haswell,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1000 -m 8192
-realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid
7c2fc02d-2798-4fc9-ad04-db5f1af92723
Hi Peter,
On 8/30/15 5:18 AM, Peter Kieser wrote:
Hi Wanpeng,
Do I need to set any module parameters to use your patch, or should
halt_poll_ns automatically tune with just your patch series applied?
You don't need any module parameters.
Regards,
Wanpeng Li
Thanks.
On 2015-08-27 2:47 AM
3.18? Btw, do you test the linux guest?
Regards,
Wanpeng Li
qemu-system-x86_64 -enable-kvm -name arwan-20150704 -S -machine
pc-q35-2.2,accel=kvm,usb=off -cpu
Haswell,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1000 -m 8192
-realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid
7c2fc02d
On 8/30/15 8:13 AM, Peter Kieser wrote:
On 2015-08-29 4:55 PM, Wanpeng Li wrote:
On 8/30/15 6:26 AM, Peter Kieser wrote:
Thanks, Wanpeng. Applied this to Linux 3.18 and seeing much higher
CPU usage (200%) for qemu 2.4.0 process on a Windows 10 x64 guest.
qemu parameters:
Thanks
On 8/28/15 12:25 AM, David Matlack wrote:
On Thu, Aug 27, 2015 at 2:59 AM, Wanpeng Li wanpeng...@hotmail.com wrote:
Hi David,
On 8/26/15 1:19 AM, David Matlack wrote:
Thanks for writing v2, Wanpeng.
On Mon, Aug 24, 2015 at 11:35 PM, Wanpeng Li wanpeng...@hotmail.com
wrote
1 - 100 of 322 matches
Mail list logo