Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4457430rwb; Mon, 21 Nov 2022 07:50:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf7bHYfgyusoQsqOoQRfLiCssDutRf9dL7xFjntiP7+w0n3vK8ggIwCeGNWnl5DG1xhnClzZ X-Received: by 2002:a17:906:d8ad:b0:7ae:9187:eb70 with SMTP id qc13-20020a170906d8ad00b007ae9187eb70mr15080587ejb.533.1669045820466; Mon, 21 Nov 2022 07:50:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669045820; cv=none; d=google.com; s=arc-20160816; b=xS0TevZrKikBgUJghW9K+POHy0NBAi7YslWascv6HpT8Gq1Ek1FB1DSjPNbY8JyP+k DVdk3EXMVFN4fm/RZ9yGDLT2QqWg1IV0YuGRYCDLvJd49JeGOsWgZplFHP8rNdvXk5zB JHCnAZMkT3dWkzVfX8QUOrirJ2hB4388iSM5ZzqEl7NuL/VyIqGUnppB8bvtRkGHEdJi 5PTiw7ZkkEDv3p5ao43PL+0IizcDHgO1hTzwaXkeuJryXoc4tnxQ+ZQXt6MXc1bHlVdM JRTQPyN2wG5oB0v1Jsb9I1/2fjUq9k2YRGvrv7UioFIWnwWnEbJF2uoIWcodwcbiKEBc pEow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GExOVM7MhNcYozmjfO/s+OM9otpBjZ/07fQJPaS+G5A=; b=L9xL6z+HoBh6gqA3sjSec7EIjR7JHT5Se2AIKjacUClqvCjxaDhKzhlrE2bhGCFsiw 4UrHVdyHRXEO0JpgmkH4WziNqjECuiNZl0LgKDFQt+pD+NkkTpqM/4kAN/kFO3prHngy 5TZ+UZNiXdjdT7dzc4i82n9K5IK6lz2SflwwJfGvEQ/SVESMJnuWgQF/6pKNFvIysOkw YCLp/Dnf4P9QvTuTQ9zF3+E8uBtg6eqASjLWroj3j4YtclaeYoQsyBhyuOd3mPRVn3lF k7n3y3KC9SKdGcb6udD2Im5pEw8BMjwnthSsgsTPJWz/ayCSU1YEm3JJl6OYcmIFK9Tm OSEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=noIl2BvK; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hg2-20020a1709072cc200b0078dec48d442si9872649ejc.680.2022.11.21.07.49.57; Mon, 21 Nov 2022 07:50:20 -0800 (PST) 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=@intel.com header.s=Intel header.b=noIl2BvK; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbiKUPHP (ORCPT + 91 others); Mon, 21 Nov 2022 10:07:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbiKUPGj (ORCPT ); Mon, 21 Nov 2022 10:06:39 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 933DCCFE82; Mon, 21 Nov 2022 06:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669042558; x=1700578558; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8QUfeKTpW+sRnX1y6HoJ/uLsh9DSsSLnb3p4CCAFZVE=; b=noIl2BvKcHsAMveTEtjFB/l27/vKr5ree+nGPQ+EJH4M5tZUf2g/QYQt pKtVt885QxByqE9hER5U6sr8nsNP4INLD8KAVYqcGF44ff2kIv0vCBojm PBK09AXZKM1fXwzzNIYdfokCWAHhz2H3WogRaOUdJxIwytkrrVCEbB4CM Wa4mmPKV207MB8boURdEojTc/3MKV0brQQ0uOztFT5brarqLO+8I0dmOC dzn8lBABYjXDd0mtImvKeiT3JhJUweXtW1QTmjDN3PJDZmJDXAJ8mIxTh M6y2sKw+kXO+w1Vqk4P2iBnZys2qJcwSJkYkjJCU6J5TZODQSpey5PnVo Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="296930035" X-IronPort-AV: E=Sophos;i="5.96,181,1665471600"; d="scan'208";a="296930035" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 06:55:58 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="815736261" X-IronPort-AV: E=Sophos;i="5.96,181,1665471600"; d="scan'208";a="815736261" Received: from zq-optiplex-7090.bj.intel.com ([10.238.156.129]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 06:55:56 -0800 From: Zqiang To: paulmck@kernel.org, frederic@kernel.org, joel@joelfernandes.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rcu-tasks: Use accurate runstart time for RCU Tasks boot-time testing Date: Mon, 21 Nov 2022 23:01:50 +0800 Message-Id: <20221121150150.319715-1-qiang1.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE 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 Currently, only get jiffies once as the runstart time for all RCU Tasks testing. it's not accurate, for each RCU Tasks type test, since corresponding type of synchronize_rcu_tasks*() be invoked, so before each RCU Tasks test starts, we need to wait for the grace period of the previous RCU Tasks test to end, there will be a deviation in the start time of the RCU Tasks test. Therefore, this commit at the start of each RCU Tasks test, re-fetch the jiffies time as the runstart time. Signed-off-by: Zqiang --- kernel/rcu/tasks.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index b0b885e071fa..4a991311be9b 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -1813,23 +1813,21 @@ static void test_rcu_tasks_callback(struct rcu_head *rhp) static void rcu_tasks_initiate_self_tests(void) { - unsigned long j = jiffies; - pr_info("Running RCU-tasks wait API self tests\n"); #ifdef CONFIG_TASKS_RCU - tests[0].runstart = j; + tests[0].runstart = jiffies; synchronize_rcu_tasks(); call_rcu_tasks(&tests[0].rh, test_rcu_tasks_callback); #endif #ifdef CONFIG_TASKS_RUDE_RCU - tests[1].runstart = j; + tests[1].runstart = jiffies; synchronize_rcu_tasks_rude(); call_rcu_tasks_rude(&tests[1].rh, test_rcu_tasks_callback); #endif #ifdef CONFIG_TASKS_TRACE_RCU - tests[2].runstart = j; + tests[2].runstart = jiffies; synchronize_rcu_tasks_trace(); call_rcu_tasks_trace(&tests[2].rh, test_rcu_tasks_callback); #endif -- 2.25.1