From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF287C001E0 for ; Wed, 2 Aug 2023 19:53:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231616AbjHBTw3 (ORCPT ); Wed, 2 Aug 2023 15:52:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232270AbjHBTwZ (ORCPT ); Wed, 2 Aug 2023 15:52:25 -0400 Received: from out-103.mta1.migadu.com (out-103.mta1.migadu.com [IPv6:2001:41d0:203:375::67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AC4519AD for ; Wed, 2 Aug 2023 12:52:24 -0700 (PDT) Date: Wed, 2 Aug 2023 19:52:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1691005942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hm3oxgB8rWWmmLgRhUOJv7kBA627iWO/DBEx4711DtQ=; b=tmNgkfGFRR9HC750nyR8v12fuZWaFZsq9GlFGNMIRlFE2Unkf0lHoo6K8HwivWN/JcS/FG TGqvrqGL6+HlG0aY0e7JWzmHvf3sq+oya4RVRqOTbDIFiLufgI4meqC9xxTFGTOEyCbnwp KXEqidowRPXrrf1Q5ry0HKewIq7KOY0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: Bibo Mao , Paolo Bonzini , Shuah Khan , kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: selftests: use unified time type for comparison Message-ID: References: <20230731022405.854884-1-maobibo@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 -- Thanks, Oliver