Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread Wanpeng Li
On 9/2/15 9:49 AM, David Matlack wrote: On Tue, Sep 1, 2015 at 5:29 PM, Wanpeng Li wrote: On 9/2/15 7:24 AM, David Matlack wrote: On Tue, Sep 1, 2015 at 3:58 PM, Wanpeng Li wrote: Why this can happen? Ah, probably because I'm missing 9c8fd1ba220 (KVM: x86: optimize delivery of TSC deadlin

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread David Matlack
On Tue, Sep 1, 2015 at 5:29 PM, Wanpeng Li wrote: > On 9/2/15 7:24 AM, David Matlack wrote: >> >> On Tue, Sep 1, 2015 at 3:58 PM, Wanpeng Li wrote: >>> >>> Why this can happen? >> >> Ah, probably because I'm missing 9c8fd1ba220 (KVM: x86: optimize delivery >> of TSC deadline timer interrupt). I

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread Wanpeng Li
On 9/2/15 7:24 AM, David Matlack wrote: On Tue, Sep 1, 2015 at 3:58 PM, Wanpeng Li wrote: On 9/2/15 6:34 AM, David Matlack wrote: On Tue, Sep 1, 2015 at 3:30 PM, Wanpeng Li wrote: On 9/2/15 5:45 AM, David Matlack wrote: On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li wrote: v3 -> v4: * br

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread David Matlack
On Tue, Sep 1, 2015 at 3:58 PM, Wanpeng Li wrote: > On 9/2/15 6:34 AM, David Matlack wrote: >> >> On Tue, Sep 1, 2015 at 3:30 PM, Wanpeng Li wrote: >>> >>> On 9/2/15 5:45 AM, David Matlack wrote: On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li wrote: > > v3 -> v4: >* b

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread Wanpeng Li
On 9/2/15 6:34 AM, David Matlack wrote: On Tue, Sep 1, 2015 at 3:30 PM, Wanpeng Li wrote: On 9/2/15 5:45 AM, David Matlack wrote: On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li wrote: v3 -> v4: * bring back grow vcpu->halt_poll_ns when interrupt arrives and shrinks when idle VCPU is det

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread David Matlack
On Tue, Sep 1, 2015 at 3:30 PM, Wanpeng Li wrote: > On 9/2/15 5:45 AM, David Matlack wrote: >> >> On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li >> wrote: >>> >>> v3 -> v4: >>> * bring back grow vcpu->halt_poll_ns when interrupt arrives and shrinks >>> when idle VCPU is detected >>> >>> v2 ->

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread Wanpeng Li
On 9/2/15 5:45 AM, David Matlack wrote: On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li wrote: v3 -> v4: * bring back grow vcpu->halt_poll_ns when interrupt arrives and shrinks when idle VCPU is detected v2 -> v3: * grow/shrink vcpu->halt_poll_ns by *halt_poll_ns_grow or /halt_poll_ns_shri

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-09-01 Thread David Matlack
On Thu, Aug 27, 2015 at 2:47 AM, Wanpeng Li wrote: > v3 -> v4: > * bring back grow vcpu->halt_poll_ns when interrupt arrives and shrinks >when idle VCPU is detected > > v2 -> v3: > * grow/shrink vcpu->halt_poll_ns by *halt_poll_ns_grow or > /halt_poll_ns_shrink > * drop the macros and hard

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-31 Thread Wanpeng Li
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

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-31 Thread Wanpeng Li
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 2.0.0, 4 vCPUs on pCPU0(other pCPUs ar

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-29 Thread Wanpeng Li
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 for the repor

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-29 Thread Peter Kieser
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 for the report. If Paolo's patch "kvm: add halt_poll

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-29 Thread Wanpeng Li
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 for the report. If Paolo's patch "kvm: add halt_poll_ns module parameter" is applied on your 3.

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-29 Thread Peter Kieser
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: 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_spinl

Re: [PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-29 Thread Wanpeng Li
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,

[PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-27 Thread Wanpeng Li
v3 -> v4: * bring back grow vcpu->halt_poll_ns when interrupt arrives and shrinks when idle VCPU is detected v2 -> v3: * grow/shrink vcpu->halt_poll_ns by *halt_poll_ns_grow or /halt_poll_ns_shrink * drop the macros and hard coding the numbers in the param definitions * update the comments

[PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-27 Thread Wanpeng Li
v3 -> v4: * bring back grow vcpu->halt_poll_ns when interrupt arrives and shrinks when idle VCPU is detected v2 -> v3: * grow/shrink vcpu->halt_poll_ns by *halt_poll_ns_grow or /halt_poll_ns_shrink * drop the macros and hard coding the numbers in the param definitions * update the comments