From patchwork Mon Jun 20 22:58:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 12888419 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 54EE1CCA483 for ; Mon, 20 Jun 2022 23:00:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345807AbiFTXAM (ORCPT ); Mon, 20 Jun 2022 19:00:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346004AbiFTW7r (ORCPT ); Mon, 20 Jun 2022 18:59:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5382319C05; Mon, 20 Jun 2022 15:58:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B956DB81647; Mon, 20 Jun 2022 22:58:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46C05C341D2; Mon, 20 Jun 2022 22:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655765900; bh=6+3iMWSppedO1jRXS9dt0Th+Hfq5H3+RDDhYWxtDlrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LNJkwZ2lpWAx9wvbrHujDxkaywKCOunJa97NeNuzpq+nAu6v6fCh5AvkqOQeXlj9q T+RArij0jQ6468unKZRDV0ayHljYSGbD+1BLSay6ok6ldeenfxgRwmWu+pPq/u8eQ7 DUibju7MeGHwj2P5UujgD6eNfR/KXXPiIFBtsK9r+FqHZMWPAItZH4HWK7oms7vU2F ypbxnq/NKA+Ef8TqbMKEoeT+ddm61JN/FopzYiwBxhV95iU1tRb1d0v3fIEMaSyfCj 7tTVbrgod4HJmeTaCIV9l+j2I1Jw3Q+EIfCrE949hBN7Ny3ppwWSM77Gm7eRomWDW4 LkEbNjX3/eeNg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 9F8BA5C0B06; Mon, 20 Jun 2022 15:58:19 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH rcu 06/12] rcutorture: Make failure indication note reader-batch overflow Date: Mon, 20 Jun 2022 15:58:11 -0700 Message-Id: <20220620225817.3843106-6-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20220620225814.GA3842995@paulmck-ThinkPad-P17-Gen-1> References: <20220620225814.GA3842995@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The loop scanning the pipesummary[] array currently skips the last element, which means that the diagnostics ignore those rarest of situations, namely where some readers persist across more than ten grace periods, but all other readers avoid spanning a full grace period. This commit therefore adjusts the scan to include the last element of this array. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 613711b8242b9..64ad5305829b6 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -1869,7 +1869,7 @@ rcu_torture_stats_print(void) batchsummary[i] += READ_ONCE(per_cpu(rcu_torture_batch, cpu)[i]); } } - for (i = RCU_TORTURE_PIPE_LEN - 1; i >= 0; i--) { + for (i = RCU_TORTURE_PIPE_LEN; i >= 0; i--) { if (pipesummary[i] != 0) break; }