From patchwork Mon Jul 17 18:11:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 13316223 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 BDBCDC001DC for ; Mon, 17 Jul 2023 18:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbjGQSLp (ORCPT ); Mon, 17 Jul 2023 14:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230509AbjGQSLn (ORCPT ); Mon, 17 Jul 2023 14:11:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4097799; Mon, 17 Jul 2023 11:11:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 207DE611E1; Mon, 17 Jul 2023 18:11:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CB43C433A9; Mon, 17 Jul 2023 18:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689617500; bh=N9K+fD3EFCsSjTZTUsdzLJiPJxPM1QAGdJD0a23WnpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o7DsUuPadJm0BDm8NK9h1ln05KhLCAhlYqBXu/hQty300WAYdzBGEx2rG1p+0r29v xer+JPV5IGFeVJkJaoBr6vK8LjOXn99WhzbPIcfW5H4mCcR+fGY8fido2K2CYfu1gV m/+cHby9EP0HYX+W6S2tpbiC0lctt+ab19BKn/pT/THkFNBv0xW/5zJLeiLHfzJW5e H0rrNY1Epood0uZ/HUb44+YjzD5K8R85BOrQjOR5GczIK00mSArjD9EQO/alCarggU S4q8ekVvGcbYJc4F0xhlQgpBB3nb/qCw57puNgj+vdY9sZMQkh0gd+ELGzpOnDYFq6 l7OMtMu1lPAcQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id BE377CE093C; Mon, 17 Jul 2023 11:11:39 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH rcu 08/13] rcuscale: Print grace-period kthread CPU time, if recorded Date: Mon, 17 Jul 2023 11:11:33 -0700 Message-Id: <20230717181138.1098063-8-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org This commit prints out the CPU time consumed by the grace-period kthread, if the specified RCU flavor supports this notion. Signed-off-by: Paul E. McKenney --- .../selftests/rcutorture/bin/kvm-recheck-rcuscale.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuscale.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuscale.sh index b582113178ac..f683e424ddd5 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuscale.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuscale.sh @@ -40,6 +40,10 @@ awk ' sum += $5 / 1000.; } +/rcu_scale: Grace-period kthread CPU time/ { + cputime = $6; +} + END { newNR = asort(gptimes); if (newNR <= 0) { @@ -78,6 +82,8 @@ END { print "90th percentile grace-period duration: " gptimes[pct90]; print "99th percentile grace-period duration: " gptimes[pct99]; print "Maximum grace-period duration: " gptimes[newNR]; - print "Grace periods: " ngps + 0 " Batches: " nbatches + 0 " Ratio: " ngps / nbatches; + if (cputime != "") + cpustr = " CPU: " cputime; + print "Grace periods: " ngps + 0 " Batches: " nbatches + 0 " Ratio: " ngps / nbatches cpustr; print "Computed from rcuscale printk output."; }'