[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZMqz8UHBvJXs8vnw@linux.dev>
Date: Wed, 2 Aug 2023 19:52:17 +0000
From: Oliver Upton <oliver.upton@...ux.dev>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Bibo Mao <maobibo@...ngson.cn>,
Paolo Bonzini <pbonzini@...hat.com>,
Shuah Khan <shuah@...nel.org>, kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: selftests: use unified time type for comparison
Howdy,
On Wed, Aug 02, 2023 at 12:30:43PM -0700, Sean Christopherson wrote:
> On Mon, Jul 31, 2023, Bibo Mao wrote:
> > With test case kvm_page_table_test, start time is acquired with
> > time type CLOCK_MONOTONIC_RAW, however end time in function timespec_elapsed
> > is acquired with time type CLOCK_MONOTONIC. This will cause
> > inaccurate elapsed time calculation on some platform such as LoongArch.
Well, there's the fundamental issue of mixing to timebases, so this
really isn't platform specific. One is subject to NTP frequency
adjustments and the other is not.
> > This patch modified test case kvm_page_table_test, and uses unified
> > time type CLOCK_MONOTONIC for start time.
>
> AFAICT, there's zero reason to use CLOCK_MONOTONIC_RAW instead of CLOCK_MONOTONIC.
> If there are no objections, I'll take this through kvm-x86/selftests for 6.6.
CLOCK_MONOTONIC is objectively the better choice if you want something
that accurately tracks wall time, which we certainly do. So yeah, fine
by me to take this through the x86 tree:
Reviewed-by: Oliver Upton <oliver.upton@...ux.dev>
--
Thanks,
Oliver
Powered by blists - more mailing lists