From patchwork Thu Oct 19 11:54:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13428716 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 33549CDB465 for ; Thu, 19 Oct 2023 11:55:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235309AbjJSLzG (ORCPT ); Thu, 19 Oct 2023 07:55:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235234AbjJSLzD (ORCPT ); Thu, 19 Oct 2023 07:55:03 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A295BE; Thu, 19 Oct 2023 04:55:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9756C433CA; Thu, 19 Oct 2023 11:54:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697716502; bh=sSbMY5CCWBmj3HxnZsWM2SzuTJFQ7pmsTLrLgETzDzc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kf6TULOcwoQ0k/urPmEbr8nA8gx7X3lqPGmstxbvYn5iU5ujZYgb7H9MoGR3aZynj pBURPPNLMy0as1zjtoRzybBs4P55OuBhVf69lgs8PEXMWC9a1mPYjkURxsWW26mGDr aQUuIyzaPB2qPXjhTfjgAG/2NE71zTlCrDlrHAIuFK5rzUADAfFL6wXQp36ZHYAfpw 7F0KUMeQ2wzVscwt8DSPnRdweG0vnIMLN9AUY52N6YsliJUHVuiPImkRSa+Am/BzOF W82uvz9a1b0iKfh/7WCqJC/s1UAYjM1JDhAxt7JzkPbQww6QLQTRpEg9P9LEkGmNu/ Vyskb1/quY7QA== From: Frederic Weisbecker To: LKML Cc: "Paul E. McKenney" , Boqun Feng , Joel Fernandes , Josh Triplett , Mathieu Desnoyers , Neeraj Upadhyay , Steven Rostedt , Uladzislau Rezki , rcu , Frederic Weisbecker Subject: [PATCH 1/3] refscale: Fix misplaced data re-read Date: Thu, 19 Oct 2023 13:54:50 +0200 Message-Id: <20231019115452.1215974-2-frederic@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019115452.1215974-1-frederic@kernel.org> References: <20231019115452.1215974-1-frederic@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" This commit fixes a misplaced data re-read in the typesafe code. The reason that this was not noticed is that this is a performance test with no writers, so a mismatch could not occur. Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/refscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index 91a0fd0d4d9a..750a63e99539 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -655,12 +655,12 @@ static void typesafe_delay_section(const int nloops, const int udl, const int nd goto retry; } un_delay(udl, ndl); + b = READ_ONCE(rtsp->a); // Remember, seqlock read-side release can fail. if (!rts_release(rtsp, start)) { rcu_read_unlock(); goto retry; } - b = READ_ONCE(rtsp->a); WARN_ONCE(a != b, "Re-read of ->a changed from %u to %u.\n", a, b); b = rtsp->b; rcu_read_unlock(); From patchwork Thu Oct 19 11:54:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13428717 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 CC66BC41513 for ; Thu, 19 Oct 2023 11:55:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345421AbjJSLzH (ORCPT ); Thu, 19 Oct 2023 07:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235301AbjJSLzG (ORCPT ); Thu, 19 Oct 2023 07:55:06 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2351DCF; Thu, 19 Oct 2023 04:55:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71318C433CB; Thu, 19 Oct 2023 11:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697716504; bh=Go3oKLV2iwygVow1ZLQqYglzITzKKMjGLPjpDzrAZBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q7R5PODf/z3kMx+FQKdwekIaM7FboamFP9pEXVbZCvWTXyybu9mERIPU6/5DMbG8W fMKR4cLZdApb+fX+yUow94ODrD4l2zF2ODLNBuMPb9/gAhITmlAsOx70OscuK9Bc4h lshWDkbl9OHMaEhfPcBIGv/HL9EI1IIyL67DGWwYHg+Uit4LKw+KrHPUBaBpUI12nz As0SZCvtgiuLs1wc3hWGSSmqqpetOaEonNkxwELDE//KqRLs3eUkw9gqZItwJyVvMu n9Y9Ov0DV8RxnCaruLDy/lUIwPkD0cS4AkC9IU0rsjBMgZRhyMewm/OqqlNBGlBai5 HR9B958lYlZXQ== From: Frederic Weisbecker To: LKML Cc: "Paul E. McKenney" , Boqun Feng , Joel Fernandes , Josh Triplett , Mathieu Desnoyers , Neeraj Upadhyay , Steven Rostedt , Uladzislau Rezki , rcu , Frederic Weisbecker Subject: [PATCH 2/3] refscale: Print out additional module parameters Date: Thu, 19 Oct 2023 13:54:51 +0200 Message-Id: <20231019115452.1215974-3-frederic@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019115452.1215974-1-frederic@kernel.org> References: <20231019115452.1215974-1-frederic@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" The refscale.verbose_batched and refscale.lookup_instances module parameters are omitted from the ref_scale_print_module_parms() beginning-of-test output. This commit therefore adds them. Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/refscale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index 750a63e99539..2c2648a3ad30 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -1025,8 +1025,8 @@ static void ref_scale_print_module_parms(struct ref_scale_ops *cur_ops, const char *tag) { pr_alert("%s" SCALE_FLAG - "--- %s: verbose=%d shutdown=%d holdoff=%d loops=%ld nreaders=%d nruns=%d readdelay=%d\n", scale_type, tag, - verbose, shutdown, holdoff, loops, nreaders, nruns, readdelay); + "--- %s: verbose=%d verbose_batched=%d shutdown=%d holdoff=%d lookup_instances=%ld loops=%ld nreaders=%d nruns=%d readdelay=%d\n", scale_type, tag, + verbose, verbose_batched, shutdown, holdoff, lookup_instances, loops, nreaders, nruns, readdelay); } static void From patchwork Thu Oct 19 11:54:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13428718 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 9A626CDB465 for ; Thu, 19 Oct 2023 11:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235340AbjJSLzP (ORCPT ); Thu, 19 Oct 2023 07:55:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235313AbjJSLzL (ORCPT ); Thu, 19 Oct 2023 07:55:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCD76132; Thu, 19 Oct 2023 04:55:07 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36A7EC433CA; Thu, 19 Oct 2023 11:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697716507; bh=RqzxDVJIn6SaPlB+MPCpu60PL8TAZpKyGGU/oT7X828=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T+ZhNOxMvLIpscISoIBjI/R3TAf3zXOb07KrqDOnbeBw7Qog//OdwXtuLObNhsUol HFYz49iYHuV+dByD4W9XbS7I7ra8Z1za4Y6+dXdrAUdY/kCs1Ea60my5w7nv7a2aC8 Z/estc3DFEAXn3dFoDdUlCaJfgS5SPttnmfWw2+rPsQjXlDhVt3bY4GxrMbil/er4j lS0Aru9X9BG88QrRHrCtglgjkMrpk55OFwlNrvgLwmdvgGQ2/FVjojM+QNpISSsvLS 8polyEJbar564igIzNLVMwVIcDcTGtSu4+WsDaLzisi30P8YT67TTWql9kCNqBILPc fuFRZN0B0NeFg== From: Frederic Weisbecker To: LKML Cc: "Paul E. McKenney" , Boqun Feng , Joel Fernandes , Josh Triplett , Mathieu Desnoyers , Neeraj Upadhyay , Steven Rostedt , Uladzislau Rezki , rcu , Frederic Weisbecker Subject: [PATCH 3/3] doc: Add refscale.lookup_instances to kernel-parameters.txt Date: Thu, 19 Oct 2023 13:54:52 +0200 Message-Id: <20231019115452.1215974-4-frederic@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019115452.1215974-1-frederic@kernel.org> References: <20231019115452.1215974-1-frederic@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" This commit adds refscale.lookup_instances to kernel-parameters.txt. Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 0a1731a0f0ef..cf4f3262ce31 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5422,6 +5422,12 @@ test until boot completes in order to avoid interference. + refscale.lookup_instances= [KNL] + Number of data elements to use for the forms of + SLAB_TYPESAFE_BY_RCU testing. A negative number + is negated and multiplied by nr_cpu_ids, while + zero specifies nr_cpu_ids. + refscale.loops= [KNL] Set the number of loops over the synchronization primitive under test. Increasing this number