LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] KVM: X86: Limit timer frequency to 200ms
@ 2018-04-30 23:35 Wanpeng Li
2018-05-04 23:44 ` Wanpeng Li
0 siblings, 1 reply; 4+ messages in thread
From: Wanpeng Li @ 2018-04-30 23:35 UTC (permalink / raw)
To: linux-kernel, kvm
Cc: Paolo Bonzini, Radim Krčmář,
Anthoine Bourgeois, Darren Kenny
From: Wanpeng Li <wanpengli@tencent.com>
Anthoine reported:
The period used by Windows change over time but it can be 1 milliseconds
or less. I saw the limit_periodic_timer_frequency print so 500
microseconds is sometimes reached.
As suggested by Paolo, lower the timer frequency limit to a
smaller interval of 200 ms (5000 Hz) to leave some headroom. This
is required due to Windows 10 changing the scheduler tick limit
from 1024 Hz to 2048 Hz.
Reported-by: Anthoine Bourgeois <anthoine.bourgeois@blade-group.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Anthoine Bourgeois <anthoine.bourgeois@blade-group.com>
Cc: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
---
v1 -> v2:
* update patch subject and description
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 51ecd38..dc47073 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -114,7 +114,7 @@ module_param(ignore_msrs, bool, S_IRUGO | S_IWUSR);
static bool __read_mostly report_ignored_msrs = true;
module_param(report_ignored_msrs, bool, S_IRUGO | S_IWUSR);
-unsigned int min_timer_period_us = 500;
+unsigned int min_timer_period_us = 200;
module_param(min_timer_period_us, uint, S_IRUGO | S_IWUSR);
static bool __read_mostly kvmclock_periodic_sync = true;
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] KVM: X86: Limit timer frequency to 200ms
2018-04-30 23:35 [PATCH v2] KVM: X86: Limit timer frequency to 200ms Wanpeng Li
@ 2018-05-04 23:44 ` Wanpeng Li
2018-05-05 8:36 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Wanpeng Li @ 2018-05-04 23:44 UTC (permalink / raw)
To: LKML, kvm
Cc: Paolo Bonzini, Radim Krčmář,
Anthoine Bourgeois, Darren Kenny
ping,
2018-05-01 7:35 GMT+08:00 Wanpeng Li <kernellwp@gmail.com>:
> From: Wanpeng Li <wanpengli@tencent.com>
>
> Anthoine reported:
> The period used by Windows change over time but it can be 1 milliseconds
> or less. I saw the limit_periodic_timer_frequency print so 500
> microseconds is sometimes reached.
>
> As suggested by Paolo, lower the timer frequency limit to a
> smaller interval of 200 ms (5000 Hz) to leave some headroom. This
> is required due to Windows 10 changing the scheduler tick limit
> from 1024 Hz to 2048 Hz.
>
> Reported-by: Anthoine Bourgeois <anthoine.bourgeois@blade-group.com>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Radim Krčmář <rkrcmar@redhat.com>
> Cc: Anthoine Bourgeois <anthoine.bourgeois@blade-group.com>
> Cc: Darren Kenny <darren.kenny@oracle.com>
> Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
> ---
> v1 -> v2:
> * update patch subject and description
>
> arch/x86/kvm/x86.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 51ecd38..dc47073 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -114,7 +114,7 @@ module_param(ignore_msrs, bool, S_IRUGO | S_IWUSR);
> static bool __read_mostly report_ignored_msrs = true;
> module_param(report_ignored_msrs, bool, S_IRUGO | S_IWUSR);
>
> -unsigned int min_timer_period_us = 500;
> +unsigned int min_timer_period_us = 200;
> module_param(min_timer_period_us, uint, S_IRUGO | S_IWUSR);
>
> static bool __read_mostly kvmclock_periodic_sync = true;
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] KVM: X86: Limit timer frequency to 200ms
2018-05-04 23:44 ` Wanpeng Li
@ 2018-05-05 8:36 ` Jan Kiszka
2018-05-05 11:03 ` Wanpeng Li
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2018-05-05 8:36 UTC (permalink / raw)
To: Wanpeng Li, LKML, kvm
Cc: Paolo Bonzini, Radim Krčmář,
Anthoine Bourgeois, Darren Kenny
On 2018-05-05 01:44, Wanpeng Li wrote:
> ping,
> 2018-05-01 7:35 GMT+08:00 Wanpeng Li <kernellwp@gmail.com>:
>> From: Wanpeng Li <wanpengli@tencent.com>
>>
>> Anthoine reported:
>> The period used by Windows change over time but it can be 1 milliseconds
>> or less. I saw the limit_periodic_timer_frequency print so 500
>> microseconds is sometimes reached.
>>
>> As suggested by Paolo, lower the timer frequency limit to a
>> smaller interval of 200 ms (5000 Hz) to leave some headroom. This
>> is required due to Windows 10 changing the scheduler tick limit
>> from 1024 Hz to 2048 Hz.
"... lower the *default* timer frequency limit to a smaller interval of
200 *us* ..." - same for the subject.
(Amazing that even Windows 10 still uses periodic ticks.)
Jan
>>
>> Reported-by: Anthoine Bourgeois <anthoine.bourgeois@blade-group.com>
>> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
>> Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Radim Krčmář <rkrcmar@redhat.com>
>> Cc: Anthoine Bourgeois <anthoine.bourgeois@blade-group.com>
>> Cc: Darren Kenny <darren.kenny@oracle.com>
>> Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
>> ---
>> v1 -> v2:
>> * update patch subject and description
>>
>> arch/x86/kvm/x86.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>> index 51ecd38..dc47073 100644
>> --- a/arch/x86/kvm/x86.c
>> +++ b/arch/x86/kvm/x86.c
>> @@ -114,7 +114,7 @@ module_param(ignore_msrs, bool, S_IRUGO | S_IWUSR);
>> static bool __read_mostly report_ignored_msrs = true;
>> module_param(report_ignored_msrs, bool, S_IRUGO | S_IWUSR);
>>
>> -unsigned int min_timer_period_us = 500;
>> +unsigned int min_timer_period_us = 200;
>> module_param(min_timer_period_us, uint, S_IRUGO | S_IWUSR);
>>
>> static bool __read_mostly kvmclock_periodic_sync = true;
>> --
>> 2.7.4
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] KVM: X86: Limit timer frequency to 200ms
2018-05-05 8:36 ` Jan Kiszka
@ 2018-05-05 11:03 ` Wanpeng Li
0 siblings, 0 replies; 4+ messages in thread
From: Wanpeng Li @ 2018-05-05 11:03 UTC (permalink / raw)
To: Jan Kiszka
Cc: LKML, kvm, Paolo Bonzini, Radim Krčmář,
Anthoine Bourgeois, Darren Kenny
2018-05-05 16:36 GMT+08:00 Jan Kiszka <jan.kiszka@web.de>:
> On 2018-05-05 01:44, Wanpeng Li wrote:
>> ping,
>> 2018-05-01 7:35 GMT+08:00 Wanpeng Li <kernellwp@gmail.com>:
>>> From: Wanpeng Li <wanpengli@tencent.com>
>>>
>>> Anthoine reported:
>>> The period used by Windows change over time but it can be 1 milliseconds
>>> or less. I saw the limit_periodic_timer_frequency print so 500
>>> microseconds is sometimes reached.
>>>
>>> As suggested by Paolo, lower the timer frequency limit to a
>>> smaller interval of 200 ms (5000 Hz) to leave some headroom. This
>>> is required due to Windows 10 changing the scheduler tick limit
>>> from 1024 Hz to 2048 Hz.
>
> "... lower the *default* timer frequency limit to a smaller interval of
> 200 *us* ..." - same for the subject.
Thanks Jan, I will update it.
Regards,
Wanpeng Li
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-05 11:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 23:35 [PATCH v2] KVM: X86: Limit timer frequency to 200ms Wanpeng Li
2018-05-04 23:44 ` Wanpeng Li
2018-05-05 8:36 ` Jan Kiszka
2018-05-05 11:03 ` Wanpeng Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).