[RFC,v2,17/20] rcutorture: Add a test config to torture test low RCU_DYNTICKS width
Message ID | 20230720163056.2564824-18-vschneid@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3246692vqt; Thu, 20 Jul 2023 09:43:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlHuL4NklVOQ4Lp7hTZzfrBTBbeIl60JpyINH+t+5FwkbRxjgvOVzLQvtruukmEXevtEvGI3 X-Received: by 2002:aa7:ccc9:0:b0:51d:9ddf:f0f3 with SMTP id y9-20020aa7ccc9000000b0051d9ddff0f3mr5031830edt.31.1689871382691; Thu, 20 Jul 2023 09:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689871382; cv=none; d=google.com; s=arc-20160816; b=U+pHz9nawq41m38HMlxx4ozz7/KNeaBL2WEOf2N5K1RTWipgO/VLiBQIGDn/oHJH1T iCACYQke5rk5arMR9wmSZzmDkwjmsIQLJ4qnVaBmoiNyFoFVrOYPnFT2oMO+LWBpeAf2 42a9965/szdp6H4Q+DuGfGF1nxO/75BvSwo6rjZKNnyPR0XVSXO5+K2qsQ2c45tDhMgS Ot+8tP3p5NQq/3Qg/GTgEgdF/xnh2gXjb+c51sw/HbPbq9fBANCHCNzBgfGqxUZ5AWRF szFGdSJBsQje+xP5QJKzOMnLKnuFvsqFHz4Y2Q0/i6NyLSM2Aq3JGYsoSsw5dHSYJUD8 ZlFQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=D+WoXJvLSOgt+Kve5Q+fkVLRoN9HdK3x6VSzpxIN5vU=; fh=KNS+F88uH/xc0YybXK2VtN2RP9EA+s15CVQCQPr6o3g=; b=GFE2V/DaZSUY5JkrYL+NeR4n1Yuwo8hU1j36z4RyLbQHKgtzhJ3FwJv3reSXDhVz0c eHXYCB5WEq6lrZShokmfO4AGdiLUa070nLYTBG7p4oXzQWIhEvTRx2Bm7NQR4QXhz2wd CTpZ7ZoiborT0SYak83IOBD4y8rXoUAVO2CNFx7W+CSTsU4Oe80yBaUGon/Oa/nZCF8P zycFWfI0M/WMWVjFLHbjZLLyk6f/aALiylMOzKmZFFTrB3kqkCKzDdivOi6lKpO+beTS B9Wr8ABIXd6rNNXQ/sWbJYXusSVuR/oUlGkC21Jjmv+3pS/aGJHJgLVM0/pLzdWIPeCE LrVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N0N3S4Br; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f23-20020a056402161700b0051de0197392si999162edv.599.2023.07.20.09.42.38; Thu, 20 Jul 2023 09:43:02 -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=@redhat.com header.s=mimecast20190719 header.b=N0N3S4Br; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231552AbjGTQkV (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Thu, 20 Jul 2023 12:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231480AbjGTQkD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Jul 2023 12:40:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF44319B5 for <linux-kernel@vger.kernel.org>; Thu, 20 Jul 2023 09:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689871082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D+WoXJvLSOgt+Kve5Q+fkVLRoN9HdK3x6VSzpxIN5vU=; b=N0N3S4BrI6ewibq0g7IofA8z40aKKra/Je/vl2HFEGe0r3FBnOwwhDcE+8xtiae+vPEpjM t4gtBKW8eLdYyo1Z/0FVoTDkpmiY7eW8ZdHOnlDP6LDsBabPrMJ549WdgSgSJJRk9KONZJ naP6dCbk1rK9ad7+vvc0w2ceGbiO1kg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-225-n6Pvv7lTMfCgsmkY3ui-qw-1; Thu, 20 Jul 2023 12:34:19 -0400 X-MC-Unique: n6Pvv7lTMfCgsmkY3ui-qw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5937B185A78F; Thu, 20 Jul 2023 16:34:16 +0000 (UTC) Received: from vschneid.remote.csb (unknown [10.42.28.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D32A40C2070; Thu, 20 Jul 2023 16:34:08 +0000 (UTC) From: Valentin Schneider <vschneid@redhat.com> To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, x86@kernel.org, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: "Paul E . McKenney" <paulmck@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Paolo Bonzini <pbonzini@redhat.com>, Wanpeng Li <wanpengli@tencent.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Frederic Weisbecker <frederic@kernel.org>, Neeraj Upadhyay <quic_neeraju@quicinc.com>, Joel Fernandes <joel@joelfernandes.org>, Josh Triplett <josh@joshtriplett.org>, Boqun Feng <boqun.feng@gmail.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Lai Jiangshan <jiangshanlai@gmail.com>, Zqiang <qiang.zhang1211@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, Uladzislau Rezki <urezki@gmail.com>, Christoph Hellwig <hch@infradead.org>, Lorenzo Stoakes <lstoakes@gmail.com>, Josh Poimboeuf <jpoimboe@kernel.org>, Jason Baron <jbaron@akamai.com>, Kees Cook <keescook@chromium.org>, Sami Tolvanen <samitolvanen@google.com>, Ard Biesheuvel <ardb@kernel.org>, Nicholas Piggin <npiggin@gmail.com>, Juerg Haefliger <juerg.haefliger@canonical.com>, Nicolas Saenz Julienne <nsaenz@kernel.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Nadav Amit <namit@vmware.com>, Dan Carpenter <error27@gmail.com>, Chuang Wang <nashuiliang@gmail.com>, Yang Jihong <yangjihong1@huawei.com>, Petr Mladek <pmladek@suse.com>, "Jason A. Donenfeld" <Jason@zx2c4.com>, Song Liu <song@kernel.org>, Julian Pidancet <julian.pidancet@oracle.com>, Tom Lendacky <thomas.lendacky@amd.com>, Dionna Glaze <dionnaglaze@google.com>, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net>, Juri Lelli <juri.lelli@redhat.com>, Daniel Bristot de Oliveira <bristot@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Yair Podemsky <ypodemsk@redhat.com> Subject: [RFC PATCH v2 17/20] rcutorture: Add a test config to torture test low RCU_DYNTICKS width Date: Thu, 20 Jul 2023 17:30:53 +0100 Message-Id: <20230720163056.2564824-18-vschneid@redhat.com> In-Reply-To: <20230720163056.2564824-1-vschneid@redhat.com> References: <20230720163056.2564824-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771958575181963159 X-GMAIL-MSGID: 1771958575181963159 |
Series |
context_tracking,x86: Defer some IPIs until a user->kernel transition
|
|
Commit Message
Valentin Schneider
July 20, 2023, 4:30 p.m. UTC
We now have an RCU_EXPORT knob for configuring the size of the dynticks
counter: CONFIG_RCU_DYNTICKS_BITS.
Add a torture config for a ridiculously small counter (2 bits). This is ac
opy of TREE4 with the added counter size restriction.
Link: http://lore.kernel.org/r/4c2cb573-168f-4806-b1d9-164e8276e66a@paulmck-laptop
Suggested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
---
.../selftests/rcutorture/configs/rcu/TREE11 | 19 +++++++++++++++++++
.../rcutorture/configs/rcu/TREE11.boot | 1 +
2 files changed, 20 insertions(+)
create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE11
create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot
Comments
On Thu, Jul 20, 2023 at 05:30:53PM +0100, Valentin Schneider wrote: > We now have an RCU_EXPORT knob for configuring the size of the dynticks > counter: CONFIG_RCU_DYNTICKS_BITS. > > Add a torture config for a ridiculously small counter (2 bits). This is ac > opy of TREE4 with the added counter size restriction. > > Link: http://lore.kernel.org/r/4c2cb573-168f-4806-b1d9-164e8276e66a@paulmck-laptop > Suggested-by: Paul E. McKenney <paulmck@kernel.org> > Signed-off-by: Valentin Schneider <vschneid@redhat.com> > --- > .../selftests/rcutorture/configs/rcu/TREE11 | 19 +++++++++++++++++++ > .../rcutorture/configs/rcu/TREE11.boot | 1 + > 2 files changed, 20 insertions(+) > create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE11 > create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11 b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 > new file mode 100644 > index 0000000000000..aa7274efd9819 > --- /dev/null > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 > @@ -0,0 +1,19 @@ > +CONFIG_SMP=y > +CONFIG_NR_CPUS=8 > +CONFIG_PREEMPT_NONE=n > +CONFIG_PREEMPT_VOLUNTARY=y > +CONFIG_PREEMPT=n > +CONFIG_PREEMPT_DYNAMIC=n > +#CHECK#CONFIG_TREE_RCU=y > +CONFIG_HZ_PERIODIC=n > +CONFIG_NO_HZ_IDLE=n > +CONFIG_NO_HZ_FULL=y > +CONFIG_RCU_TRACE=y > +CONFIG_RCU_FANOUT=4 > +CONFIG_RCU_FANOUT_LEAF=3 > +CONFIG_DEBUG_LOCK_ALLOC=n > +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n > +CONFIG_RCU_EXPERT=y > +CONFIG_RCU_EQS_DEBUG=y > +CONFIG_RCU_LAZY=y > +CONFIG_RCU_DYNTICKS_BITS=2 Why not just add this last line to the existing TREE04 scenario? That would ensure that it gets tested regularly without extending the time required to run a full set of rcutorture tests. > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot > new file mode 100644 > index 0000000000000..a8d94caf7d2fd > --- /dev/null > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot > @@ -0,0 +1 @@ > +rcutree.rcu_fanout_leaf=4 nohz_full=1-N > -- > 2.31.1 >
On Thu, Jul 20, 2023 at 12:53:05PM -0700, Paul E. McKenney wrote: > On Thu, Jul 20, 2023 at 05:30:53PM +0100, Valentin Schneider wrote: > > We now have an RCU_EXPORT knob for configuring the size of the dynticks > > counter: CONFIG_RCU_DYNTICKS_BITS. > > > > Add a torture config for a ridiculously small counter (2 bits). This is ac > > opy of TREE4 with the added counter size restriction. > > > > Link: http://lore.kernel.org/r/4c2cb573-168f-4806-b1d9-164e8276e66a@paulmck-laptop > > Suggested-by: Paul E. McKenney <paulmck@kernel.org> > > Signed-off-by: Valentin Schneider <vschneid@redhat.com> > > --- > > .../selftests/rcutorture/configs/rcu/TREE11 | 19 +++++++++++++++++++ > > .../rcutorture/configs/rcu/TREE11.boot | 1 + > > 2 files changed, 20 insertions(+) > > create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE11 > > create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot > > > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11 b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 > > new file mode 100644 > > index 0000000000000..aa7274efd9819 > > --- /dev/null > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 > > @@ -0,0 +1,19 @@ > > +CONFIG_SMP=y > > +CONFIG_NR_CPUS=8 > > +CONFIG_PREEMPT_NONE=n > > +CONFIG_PREEMPT_VOLUNTARY=y > > +CONFIG_PREEMPT=n > > +CONFIG_PREEMPT_DYNAMIC=n > > +#CHECK#CONFIG_TREE_RCU=y > > +CONFIG_HZ_PERIODIC=n > > +CONFIG_NO_HZ_IDLE=n > > +CONFIG_NO_HZ_FULL=y > > +CONFIG_RCU_TRACE=y > > +CONFIG_RCU_FANOUT=4 > > +CONFIG_RCU_FANOUT_LEAF=3 > > +CONFIG_DEBUG_LOCK_ALLOC=n > > +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n > > +CONFIG_RCU_EXPERT=y > > +CONFIG_RCU_EQS_DEBUG=y > > +CONFIG_RCU_LAZY=y > > +CONFIG_RCU_DYNTICKS_BITS=2 > > Why not just add this last line to the existing TREE04 scenario? > That would ensure that it gets tested regularly without extending the > time required to run a full set of rcutorture tests. Please see below for the version of this patch that I am running overnight tests with. Does this one work for you? Thanx, Paul ------------------------------------------------------------------------ commit 1aa13731e665193cd833edac5ebc86a9c3fea2b7 Author: Valentin Schneider <vschneid@redhat.com> Date: Thu Jul 20 20:58:41 2023 -0700 rcutorture: Add a test config to torture test low RCU_DYNTICKS width We now have an RCU_EXPORT knob for configuring the size of the dynticks counter: CONFIG_RCU_DYNTICKS_BITS. Modify scenario TREE04 to exercise a a ridiculously small counter (2 bits). Link: http://lore.kernel.org/r/4c2cb573-168f-4806-b1d9-164e8276e66a@paulmck-laptop Suggested-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04 index dc4985064b3a..aa7274efd981 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04 @@ -16,3 +16,4 @@ CONFIG_DEBUG_OBJECTS_RCU_HEAD=n CONFIG_RCU_EXPERT=y CONFIG_RCU_EQS_DEBUG=y CONFIG_RCU_LAZY=y +CONFIG_RCU_DYNTICKS_BITS=2
On 20/07/23 21:00, Paul E. McKenney wrote: > On Thu, Jul 20, 2023 at 12:53:05PM -0700, Paul E. McKenney wrote: >> On Thu, Jul 20, 2023 at 05:30:53PM +0100, Valentin Schneider wrote: >> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11 b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 >> > new file mode 100644 >> > index 0000000000000..aa7274efd9819 >> > --- /dev/null >> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 >> > @@ -0,0 +1,19 @@ >> > +CONFIG_SMP=y >> > +CONFIG_NR_CPUS=8 >> > +CONFIG_PREEMPT_NONE=n >> > +CONFIG_PREEMPT_VOLUNTARY=y >> > +CONFIG_PREEMPT=n >> > +CONFIG_PREEMPT_DYNAMIC=n >> > +#CHECK#CONFIG_TREE_RCU=y >> > +CONFIG_HZ_PERIODIC=n >> > +CONFIG_NO_HZ_IDLE=n >> > +CONFIG_NO_HZ_FULL=y >> > +CONFIG_RCU_TRACE=y >> > +CONFIG_RCU_FANOUT=4 >> > +CONFIG_RCU_FANOUT_LEAF=3 >> > +CONFIG_DEBUG_LOCK_ALLOC=n >> > +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n >> > +CONFIG_RCU_EXPERT=y >> > +CONFIG_RCU_EQS_DEBUG=y >> > +CONFIG_RCU_LAZY=y >> > +CONFIG_RCU_DYNTICKS_BITS=2 >> >> Why not just add this last line to the existing TREE04 scenario? >> That would ensure that it gets tested regularly without extending the >> time required to run a full set of rcutorture tests. > > Please see below for the version of this patch that I am running overnight > tests with. Does this one work for you? > Yep that's fine with me. I only went with a separate test file as wasn't sure how new test options should be handled (merged into existing tests vs new tests created), and didn't want to negatively impact TREE04 or TREE06. If merging into TREE04 is preferred, then I'll do just that and carry this path moving forwards. Thanks!
On Fri, Jul 21, 2023 at 08:58:53AM +0100, Valentin Schneider wrote: > On 20/07/23 21:00, Paul E. McKenney wrote: > > On Thu, Jul 20, 2023 at 12:53:05PM -0700, Paul E. McKenney wrote: > >> On Thu, Jul 20, 2023 at 05:30:53PM +0100, Valentin Schneider wrote: > >> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11 b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 > >> > new file mode 100644 > >> > index 0000000000000..aa7274efd9819 > >> > --- /dev/null > >> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 > >> > @@ -0,0 +1,19 @@ > >> > +CONFIG_SMP=y > >> > +CONFIG_NR_CPUS=8 > >> > +CONFIG_PREEMPT_NONE=n > >> > +CONFIG_PREEMPT_VOLUNTARY=y > >> > +CONFIG_PREEMPT=n > >> > +CONFIG_PREEMPT_DYNAMIC=n > >> > +#CHECK#CONFIG_TREE_RCU=y > >> > +CONFIG_HZ_PERIODIC=n > >> > +CONFIG_NO_HZ_IDLE=n > >> > +CONFIG_NO_HZ_FULL=y > >> > +CONFIG_RCU_TRACE=y > >> > +CONFIG_RCU_FANOUT=4 > >> > +CONFIG_RCU_FANOUT_LEAF=3 > >> > +CONFIG_DEBUG_LOCK_ALLOC=n > >> > +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n > >> > +CONFIG_RCU_EXPERT=y > >> > +CONFIG_RCU_EQS_DEBUG=y > >> > +CONFIG_RCU_LAZY=y > >> > +CONFIG_RCU_DYNTICKS_BITS=2 > >> > >> Why not just add this last line to the existing TREE04 scenario? > >> That would ensure that it gets tested regularly without extending the > >> time required to run a full set of rcutorture tests. > > > > Please see below for the version of this patch that I am running overnight > > tests with. Does this one work for you? > > Yep that's fine with me. I only went with a separate test file as wasn't > sure how new test options should be handled (merged into existing tests vs > new tests created), and didn't want to negatively impact TREE04 or > TREE06. If merging into TREE04 is preferred, then I'll do just that and > carry this path moving forwards. Things worked fine for this one-hour-per-scenario test run on my laptop, except for the CONFIG_SMP=n runs, which all got build errors like the following. Thanx, Paul ------------------------------------------------------------------------ In file included from ./include/linux/container_of.h:5, from ./include/linux/list.h:5, from ./include/linux/swait.h:5, from ./include/linux/completion.h:12, from ./include/linux/crypto.h:15, from arch/x86/kernel/asm-offsets.c:9: ./include/linux/context_tracking_state.h:56:61: error: ‘struct context_tracking’ has no member named ‘state’ 56 | #define CT_STATE_SIZE (sizeof(((struct context_tracking *)0)->state) * BITS_PER_BYTE) | ^~ ./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’ 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ ./include/linux/context_tracking_state.h:73:1: note: in expansion of macro ‘static_assert’ 73 | static_assert((CONTEXT_STATE_END + 1 - CONTEXT_STATE_START) + | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:61:29: note: in expansion of macro ‘CT_STATE_SIZE’ 61 | #define RCU_DYNTICKS_START (CT_STATE_SIZE - CONFIG_RCU_DYNTICKS_BITS) | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:70:29: note: in expansion of macro ‘RCU_DYNTICKS_START’ 70 | #define CONTEXT_WORK_END (RCU_DYNTICKS_START - 1) | ^~~~~~~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:74:16: note: in expansion of macro ‘CONTEXT_WORK_END’ 74 | (CONTEXT_WORK_END + 1 - CONTEXT_WORK_START) + | ^~~~~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:56:61: error: ‘struct context_tracking’ has no member named ‘state’ 56 | #define CT_STATE_SIZE (sizeof(((struct context_tracking *)0)->state) * BITS_PER_BYTE) | ^~ ./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’ 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ ./include/linux/context_tracking_state.h:73:1: note: in expansion of macro ‘static_assert’ 73 | static_assert((CONTEXT_STATE_END + 1 - CONTEXT_STATE_START) + | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:62:29: note: in expansion of macro ‘CT_STATE_SIZE’ 62 | #define RCU_DYNTICKS_END (CT_STATE_SIZE - 1) | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:75:16: note: in expansion of macro ‘RCU_DYNTICKS_END’ 75 | (RCU_DYNTICKS_END + 1 - RCU_DYNTICKS_START) == | ^~~~~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:56:61: error: ‘struct context_tracking’ has no member named ‘state’ 56 | #define CT_STATE_SIZE (sizeof(((struct context_tracking *)0)->state) * BITS_PER_BYTE) | ^~ ./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’ 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ ./include/linux/context_tracking_state.h:73:1: note: in expansion of macro ‘static_assert’ 73 | static_assert((CONTEXT_STATE_END + 1 - CONTEXT_STATE_START) + | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:61:29: note: in expansion of macro ‘CT_STATE_SIZE’ 61 | #define RCU_DYNTICKS_START (CT_STATE_SIZE - CONFIG_RCU_DYNTICKS_BITS) | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:75:40: note: in expansion of macro ‘RCU_DYNTICKS_START’ 75 | (RCU_DYNTICKS_END + 1 - RCU_DYNTICKS_START) == | ^~~~~~~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:56:61: error: ‘struct context_tracking’ has no member named ‘state’ 56 | #define CT_STATE_SIZE (sizeof(((struct context_tracking *)0)->state) * BITS_PER_BYTE) | ^~ ./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’ 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ ./include/linux/context_tracking_state.h:73:1: note: in expansion of macro ‘static_assert’ 73 | static_assert((CONTEXT_STATE_END + 1 - CONTEXT_STATE_START) + | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:76:15: note: in expansion of macro ‘CT_STATE_SIZE’ 76 | CT_STATE_SIZE); | ^~~~~~~~~~~~~ ./include/linux/context_tracking_state.h:73:15: error: expression in static assertion is not an integer 73 | static_assert((CONTEXT_STATE_END + 1 - CONTEXT_STATE_START) + | ^ ./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’ 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ ./include/linux/context_tracking_state.h:73:1: note: in expansion of macro ‘static_assert’ 73 | static_assert((CONTEXT_STATE_END + 1 - CONTEXT_STATE_START) + | ^~~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:116: arch/x86/kernel/asm-offsets.s] Error 1 make[1]: *** [/home/git/linux-rcu-1/Makefile:1275: prepare0] Error 2 make[1]: *** Waiting for unfinished jobs.... LD /home/git/linux-rcu-1/tools/objtool/objtool-in.o LINK /home/git/linux-rcu-1/tools/objtool/objtool make: *** [Makefile:234: __sub-make] Error 2
On 21/07/23 07:07, Paul E. McKenney wrote: > On Fri, Jul 21, 2023 at 08:58:53AM +0100, Valentin Schneider wrote: >> On 20/07/23 21:00, Paul E. McKenney wrote: >> > On Thu, Jul 20, 2023 at 12:53:05PM -0700, Paul E. McKenney wrote: >> >> On Thu, Jul 20, 2023 at 05:30:53PM +0100, Valentin Schneider wrote: >> >> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11 b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 >> >> > new file mode 100644 >> >> > index 0000000000000..aa7274efd9819 >> >> > --- /dev/null >> >> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 >> >> > @@ -0,0 +1,19 @@ >> >> > +CONFIG_SMP=y >> >> > +CONFIG_NR_CPUS=8 >> >> > +CONFIG_PREEMPT_NONE=n >> >> > +CONFIG_PREEMPT_VOLUNTARY=y >> >> > +CONFIG_PREEMPT=n >> >> > +CONFIG_PREEMPT_DYNAMIC=n >> >> > +#CHECK#CONFIG_TREE_RCU=y >> >> > +CONFIG_HZ_PERIODIC=n >> >> > +CONFIG_NO_HZ_IDLE=n >> >> > +CONFIG_NO_HZ_FULL=y >> >> > +CONFIG_RCU_TRACE=y >> >> > +CONFIG_RCU_FANOUT=4 >> >> > +CONFIG_RCU_FANOUT_LEAF=3 >> >> > +CONFIG_DEBUG_LOCK_ALLOC=n >> >> > +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n >> >> > +CONFIG_RCU_EXPERT=y >> >> > +CONFIG_RCU_EQS_DEBUG=y >> >> > +CONFIG_RCU_LAZY=y >> >> > +CONFIG_RCU_DYNTICKS_BITS=2 >> >> >> >> Why not just add this last line to the existing TREE04 scenario? >> >> That would ensure that it gets tested regularly without extending the >> >> time required to run a full set of rcutorture tests. >> > >> > Please see below for the version of this patch that I am running overnight >> > tests with. Does this one work for you? >> >> Yep that's fine with me. I only went with a separate test file as wasn't >> sure how new test options should be handled (merged into existing tests vs >> new tests created), and didn't want to negatively impact TREE04 or >> TREE06. If merging into TREE04 is preferred, then I'll do just that and >> carry this path moving forwards. > > Things worked fine for this one-hour-per-scenario test run on my laptop, Many thanks for testing! > except for the CONFIG_SMP=n runs, which all got build errors like the > following. > Harumph, yes !SMP (and !CONTEXT_TRACKING_WORK) doesn't compile nicely, I'll fix that for v3.
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11 b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 new file mode 100644 index 0000000000000..aa7274efd9819 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11 @@ -0,0 +1,19 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_PREEMPT=n +CONFIG_PREEMPT_DYNAMIC=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=n +CONFIG_NO_HZ_FULL=y +CONFIG_RCU_TRACE=y +CONFIG_RCU_FANOUT=4 +CONFIG_RCU_FANOUT_LEAF=3 +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_RCU_EXPERT=y +CONFIG_RCU_EQS_DEBUG=y +CONFIG_RCU_LAZY=y +CONFIG_RCU_DYNTICKS_BITS=2 diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot new file mode 100644 index 0000000000000..a8d94caf7d2fd --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE11.boot @@ -0,0 +1 @@ +rcutree.rcu_fanout_leaf=4 nohz_full=1-N