Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Paolo Bonzini
On 09/02/2015 09:22, Xiao Guangrong wrote: On 02/06/2015 08:48 PM, Paolo Bonzini wrote: +unsigned int halt_poll_ns = 0; +module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR); + Can we make this parameter be changeable? So that we can tune it on the fly. It is changeable (S_IWUSR).

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Radim Krčmář
2015-02-06 13:48+0100, Paolo Bonzini: [...] Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Reviewed-by: Radim Krčmář rkrc...@redhat.com Noticed changes since RFC: - polling is used in more situations - new tracepoint - module parameter in nanoseconds - properly handled time - no

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Paolo Bonzini
On 09/02/2015 16:21, Radim Krčmář wrote: 2015-02-06 13:48+0100, Paolo Bonzini: [...] Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Reviewed-by: Radim Krčmář rkrc...@redhat.com Noticed changes since RFC: - polling is used in more situations - new tracepoint - module

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread David Matlack
On Fri, Feb 6, 2015 at 4:48 AM, Paolo Bonzini pbonz...@redhat.com wrote: This patch introduces a new module parameter for the KVM module; when it is present, KVM attempts a bit of polling on every HLT before scheduling itself out via kvm_vcpu_block. [...] Signed-off-by: Paolo Bonzini

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Xiao Guangrong
On 02/06/2015 08:48 PM, Paolo Bonzini wrote: +unsigned int halt_poll_ns = 0; +module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR); + Can we make this parameter be changeable? So that we can tune it on the fly. finish_wait(vcpu-wq, wait); + cur = ktime_get(); We can move

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Paolo Bonzini
On 09/02/2015 22:00, Christian Borntraeger wrote: I can confirm that this also helps uperf with a 1/1 byte round trip work load between guests on s390. And I can confirm the higher CPU load. This is normally a no-go for the typical s390 users, which utilize their systems as much as

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Radim Krčmář
2015-02-09 17:10+0100, Paolo Bonzini: On 09/02/2015 16:21, Radim Krčmář wrote: 2015-02-06 13:48+0100, Paolo Bonzini: +TRACE_EVENT(kvm_vcpu_wakeup, + TP_PROTO(__u64 ns, bool waited), (__u64 is preferred here?) Preferred to what? To 'u64'. (The header file shouldn't be

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Christian Borntraeger
Am 06.02.2015 um 13:48 schrieb Paolo Bonzini: This patch introduces a new module parameter for the KVM module; when it is present, KVM attempts a bit of polling on every HLT before scheduling itself out via kvm_vcpu_block. This parameter helps a lot for latency-bound workloads---in

Re: [PATCH] kvm: add halt_poll_ns module parameter

2015-02-09 Thread Xiao Guangrong
On 02/09/2015 05:06 PM, Paolo Bonzini wrote: On 09/02/2015 09:22, Xiao Guangrong wrote: On 02/06/2015 08:48 PM, Paolo Bonzini wrote: +unsigned int halt_poll_ns = 0; +module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR); + Can we make this parameter be changeable? So that we can tune

[PATCH] kvm: add halt_poll_ns module parameter

2015-02-06 Thread Paolo Bonzini
This patch introduces a new module parameter for the KVM module; when it is present, KVM attempts a bit of polling on every HLT before scheduling itself out via kvm_vcpu_block. This parameter helps a lot for latency-bound workloads---in particular I tested it with O_DSYNC writes with a