lkml.org 
[lkml]   [2021]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 03/10] KVM: selftests: Use flag CLOCK_MONOTONIC_RAW for timing
From
Date
Hi Paolo,

On 2021/4/17 21:23, Paolo Bonzini wrote:
> On 30/03/21 10:08, Yanan Wang wrote:
>> In addition to function of CLOCK_MONOTONIC, flag CLOCK_MONOTONIC_RAW can
>> also shield possiable impact of NTP, which can provide more robustness.
>>
>> Suggested-by: Vitaly Kuznetsov<vkuznets@redhat.com>
>> Signed-off-by: Yanan Wang<wangyanan55@huawei.com>
>> Reviewed-by: Ben Gardon<bgardon@google.com>
>> Reviewed-by: Andrew Jones<drjones@redhat.com>
>
> I'm not sure about this one, is the effect visible?
>
In practice, difference between results got with CLOCK_MONOTONIC and
CLOCK_MONOTONIC_RAW
actually is too little to be visible. But if just in theory,
CLOCK_MONOTONIC_RAW can ensure time results
of the compared tests are based on the same local oscillator frequency,
which is not subject to possible
NTP frequency adjustment. Change in this patch seems like a bit of
optimization.

But either of these two flags is good to me. If this patch is not
convincing enough to be accepted, I will
post a patch later in fix use of CLOCK_MONOTONIC_RAW in
kvm_page_table_test.c just to be consistent
with other kvm tests, please queue. :)

Thanks,
Yanan


\
 
 \ /
  Last update: 2021-04-19 08:41    [W:0.067 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site