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 Kuznetsovvkuznets@redhat.com Signed-off-by: Yanan Wangwangyanan55@huawei.com Reviewed-by: Ben Gardonbgardon@google.com Reviewed-by: Andrew Jonesdrjones@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