Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1396742rwo; Wed, 2 Aug 2023 13:23:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlGQSKnI+qa7Sa+MBYahXNJM7J/Ng2IvWrocKQzHNn+Ufb75hG88M3RQggcJ2DDlhPlmyGky X-Received: by 2002:a05:6870:f103:b0:1b0:25b4:4b77 with SMTP id k3-20020a056870f10300b001b025b44b77mr17482633oac.14.1691007835348; Wed, 02 Aug 2023 13:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691007835; cv=none; d=google.com; s=arc-20160816; b=mb6FZ0Jc3Kb074YYwqSysIzow/RnPwtzS49mtg1I13Zi4kOQV1nRZ24vNM9CRpEtOO RoZ3HkmW6MawFBIMU4As06t/iLteVykg/sUKNAgyQDFXvhYXcMQgRU/2nLAl9hOmS1KR H3ynCAbVB5JQ0MUFpqAyceAyLx9wZQzXTI4nl0nVK0DKIkGYSWHLdhqSnjE+1SycjDYp oMkAQzn3byz9Hm9kxcdVDyk99U07w1lBxNB6yemShJBYAn41GgiM8IIIzl29k4Q1fZZY MC17OnfjhrcXq8YeJASLKQLPAl6W6XX7iS3wWieoHTjCyXZjEfTdlXivqWjgpRGmzpXi DJZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=hm3oxgB8rWWmmLgRhUOJv7kBA627iWO/DBEx4711DtQ=; fh=Sdh8SY/65WlTGk0zl1xVhiw9362989OcdtvgdusDxGw=; b=PExy1JLkdwxQX+sTm1246gWMj9x3+/JVKvw38uleYMQT+/XK500FsLtXZXwlJC+let D+R9JeR0giXeNRou7ICC0F5aI+3vfLezRp97GffucP0UOmJMhn0lwkkscb2SZGGBqV4d 7yGTc7DYT5u20X0H9wo7I7m/efxML1AMZ9rODTZdGaHlaAAF2J2vMVPsaiMGOUuw730o xZNmyAvFo0XWz3fMCB4T4coXFCNom6IOv5RZIstr91oGLKdMKR70sjF5ep6u7npMljqL +sHpoGJ3AqeHiDKqeNNvyETT0l6yxtGbCHVIUzf6M5gfh6vzdhbg1II+ZCasYjch71Ur xqfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tmNgkfGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lj11-20020a17090b344b00b0026319a0a04asi887060pjb.171.2023.08.02.13.23.43; Wed, 02 Aug 2023 13:23:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tmNgkfGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231646AbjHBTw3 (ORCPT + 99 others); Wed, 2 Aug 2023 15:52:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232259AbjHBTwZ (ORCPT ); Wed, 2 Aug 2023 15:52:25 -0400 Received: from out-125.mta1.migadu.com (out-125.mta1.migadu.com [IPv6:2001:41d0:203:375::7d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ACF619B9 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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