linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2
@ 2015-05-12 22:57 Paul E. McKenney
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
  2015-05-13  1:07 ` [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 josh
  0 siblings, 2 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani

Hello!

This series contains torture-test updates:

1.	Use correct locking primitive, thus avoiding deadlock, courtesy
	of Alexey Kodanev.

2.	Exchange TREE03 and TREE04 geometries in order to improve bug-location
	rates.

3.	Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug to further
	improve bug-location rates.

4.	Allow negative values of nreaders to in order to oversubscribe
	the CPUs, again to improve bug-location rates.

5.	Change longdelay_us to longdelay_ms in order to better reflect
	reality.  (Not that gcc cares, but people reading the code just
	might.)

6.	Replace open-coded memory barriers with the shiny new
	smp_store_release() and smp_load_acquire() primitives.

7.	Test SRCU cleanup code path in order to improve test coverage.

8.	Avoid explicitly setting CONFIG_TASKS_RCU, given that it is
	now set implicitly based on other configuration options.

9.	Update configuration fragments from CONFIG_RCU_FANOUT_EXACT to
	the new rcutree.rcu_fanout_exact= boot parameter.

10.	Make rcutorture scripts force RCU_EXPERT so that they can still
	build the needed kernel configurations.

11.	Update TREE_RCU-kconfig.txt to describe new kernel-parameter
	setup.

12.	Make torture scripts display "make oldconfig" errors

13.	Allow repetition factors in Kconfig-fragment lists.  Because
	typing 48 repetitions of "TINY02" is getting old.

							Thanx, Paul

------------------------------------------------------------------------

 b/kernel/locking/locktorture.c                                 |   14 -
 b/kernel/rcu/rcutorture.c                                      |  103 ++++++----
 b/tools/testing/selftests/rcutorture/bin/configinit.sh         |    2 
 b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh        |    4 
 b/tools/testing/selftests/rcutorture/bin/kvm.sh                |   25 +-
 b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N        |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P        |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot   |    2 
 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01       |    5 
 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS02       |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS03       |    2 
 b/tools/testing/selftests/rcutorture/configs/rcu/TINY02        |    2 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE01        |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE02        |    2 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE02-T      |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE03        |    8 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot   |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04        |    8 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE05        |    4 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06        |    4 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot   |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07        |    4 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08        |    6 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T      |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T.boot |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot   |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE09        |    1 
 b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt  |   36 +--
 28 files changed, 148 insertions(+), 94 deletions(-)


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type
  2015-05-12 22:57 [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 Paul E. McKenney
@ 2015-05-12 22:58 ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 02/13] rcutorture: Exchange TREE03 and TREE04 geometries Paul E. McKenney
                     ` (11 more replies)
  2015-05-13  1:07 ` [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 josh
  1 sibling, 12 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Alexey Kodanev, Paul E. McKenney

From: Alexey Kodanev <alexey.kodanev@oracle.com>

torture_rwlock_read_unlock_irq() must use read_unlock_irqrestore()
instead of write_unlock_irqrestore().

Use read_unlock_irqrestore() instead of write_unlock_irqrestore().

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/locking/locktorture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index ec8cce259779..6a2723c88c33 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -309,7 +309,7 @@ static int torture_rwlock_read_lock_irq(void) __acquires(torture_rwlock)
 static void torture_rwlock_read_unlock_irq(void)
 __releases(torture_rwlock)
 {
-	write_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
+	read_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
 }
 
 static struct lock_torture_ops rw_lock_irq_ops = {
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 02/13] rcutorture: Exchange TREE03 and TREE04 geometries
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 03/13] rcutorture: Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug Paul E. McKenney
                     ` (10 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

Given that the combination of PREEMPT_RCU and HOTPLUG_CPU is producing the
most bugs lately, this commit swaps the TREE03 and TREE04 rcu_node-tree
geometries so that the test exercising PREEMPT_RCU and HOTPLUG_CPU has
three-level rather than two-level rcu_node trees.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 tools/testing/selftests/rcutorture/configs/rcu/TREE03 | 4 ++--
 tools/testing/selftests/rcutorture/configs/rcu/TREE04 | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE03 b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
index 53f24e0a0ab6..4dc8339bab5e 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE03
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
@@ -9,8 +9,8 @@ CONFIG_NO_HZ_IDLE=n
 CONFIG_NO_HZ_FULL=n
 CONFIG_RCU_TRACE=y
 CONFIG_HOTPLUG_CPU=y
-CONFIG_RCU_FANOUT=4
-CONFIG_RCU_FANOUT_LEAF=4
+CONFIG_RCU_FANOUT=2
+CONFIG_RCU_FANOUT_LEAF=2
 CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
index 0f84db35b36d..4eb6d374a0ca 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
@@ -13,8 +13,8 @@ CONFIG_RCU_TRACE=y
 CONFIG_HOTPLUG_CPU=n
 CONFIG_SUSPEND=n
 CONFIG_HIBERNATION=n
-CONFIG_RCU_FANOUT=2
-CONFIG_RCU_FANOUT_LEAF=2
+CONFIG_RCU_FANOUT=4
+CONFIG_RCU_FANOUT_LEAF=4
 CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 03/13] rcutorture: Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 02/13] rcutorture: Exchange TREE03 and TREE04 geometries Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe Paul E. McKenney
                     ` (9 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

TREE03 has been especially effective at finding bugs lately.  This commit
makes it even more effective by speeding up its CPU hotplug testing and
increasing its NR_CPUs from 8 to 16.  TREE08's NR_CPUS is decreased from
16 to 8 in order to maintain the same test duration.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 tools/testing/selftests/rcutorture/configs/rcu/TREE03      | 2 +-
 tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE08      | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot

diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE03 b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
index 4dc8339bab5e..05a81380a5c2 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE03
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
@@ -1,5 +1,5 @@
 CONFIG_SMP=y
-CONFIG_NR_CPUS=8
+CONFIG_NR_CPUS=16
 CONFIG_PREEMPT_NONE=n
 CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot
new file mode 100644
index 000000000000..120c0c88d100
--- /dev/null
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot
@@ -0,0 +1 @@
+rcutorture.onoff_interval=1 rcutorture.onoff_holdoff=30
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
index 5812027d6f9f..acce6552f7f0 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
@@ -1,5 +1,5 @@
 CONFIG_SMP=y
-CONFIG_NR_CPUS=16
+CONFIG_NR_CPUS=8
 CONFIG_PREEMPT_NONE=n
 CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=y
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 02/13] rcutorture: Exchange TREE03 and TREE04 geometries Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 03/13] rcutorture: Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-13  1:03     ` josh
  2015-05-12 22:58   ` [PATCH tip/core/rcu 05/13] locktorture: Change longdelay_us to longdelay_ms Paul E. McKenney
                     ` (8 subsequent siblings)
  11 siblings, 1 reply; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

By default, with rcutorture.nreaders equal to -1, rcutorture provisions
N-1 reader kthreads, where N is the number of CPUs.  This avoids
rcutorture-induced stalls, but also avoids heavier levels of torture.
This commit therefore allows negative values of rcutorture.nreaders
to specify larger numbers of reader kthreads, so that for example
rcutorture.nreaders=-2 provisions N kthreads and rcutorture.nreaders=-5
provisions N+3 kthreads.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 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 a67ef6ff86b0..7294d605c481 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1701,7 +1701,7 @@ rcu_torture_init(void)
 	if (nreaders >= 0) {
 		nrealreaders = nreaders;
 	} else {
-		nrealreaders = num_online_cpus() - 1;
+		nrealreaders = num_online_cpus() - 2 - nreaders;
 		if (nrealreaders <= 0)
 			nrealreaders = 1;
 	}
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 05/13] locktorture: Change longdelay_us to longdelay_ms
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (2 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 06/13] rcutorture: Replace barriers with smp_store_release() and smp_load_acquire() Paul E. McKenney
                     ` (7 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney, Davidlohr Bueso

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

The locktorture long delays are in milliseconds rather than microseconds,
so this commit changes the name of the corresponding variable from
longdelay_us to longdelay_ms.

Reported-by: Ben Goodwyn <bgoodwyn@softnas.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
---
 kernel/locking/locktorture.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index 6a2723c88c33..32244186f1f2 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -122,12 +122,12 @@ static int torture_lock_busted_write_lock(void)
 
 static void torture_lock_busted_write_delay(struct torture_random_state *trsp)
 {
-	const unsigned long longdelay_us = 100;
+	const unsigned long longdelay_ms = 100;
 
 	/* We want a long delay occasionally to force massive contention.  */
 	if (!(torture_random(trsp) %
-	      (cxt.nrealwriters_stress * 2000 * longdelay_us)))
-		mdelay(longdelay_us);
+	      (cxt.nrealwriters_stress * 2000 * longdelay_ms)))
+		mdelay(longdelay_ms);
 #ifdef CONFIG_PREEMPT
 	if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
 		preempt_schedule();  /* Allow test to be preempted. */
@@ -160,14 +160,14 @@ static int torture_spin_lock_write_lock(void) __acquires(torture_spinlock)
 static void torture_spin_lock_write_delay(struct torture_random_state *trsp)
 {
 	const unsigned long shortdelay_us = 2;
-	const unsigned long longdelay_us = 100;
+	const unsigned long longdelay_ms = 100;
 
 	/* We want a short delay mostly to emulate likely code, and
 	 * we want a long delay occasionally to force massive contention.
 	 */
 	if (!(torture_random(trsp) %
-	      (cxt.nrealwriters_stress * 2000 * longdelay_us)))
-		mdelay(longdelay_us);
+	      (cxt.nrealwriters_stress * 2000 * longdelay_ms)))
+		mdelay(longdelay_ms);
 	if (!(torture_random(trsp) %
 	      (cxt.nrealwriters_stress * 2 * shortdelay_us)))
 		udelay(shortdelay_us);
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 06/13] rcutorture: Replace barriers with smp_store_release() and smp_load_acquire()
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (3 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 05/13] locktorture: Change longdelay_us to longdelay_ms Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 07/13] rcutorture: Test SRCU cleanup code path Paul E. McKenney
                     ` (6 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

The rcutorture.c file uses several explicit memory barriers that can
easily be converted to smp_store_release() and smp_load_acquire(), which
improves maintainability and also improves performance a bit.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/rcutorture.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 7294d605c481..90ff8dfc51e5 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -672,8 +672,8 @@ static void rcu_torture_boost_cb(struct rcu_head *head)
 	struct rcu_boost_inflight *rbip =
 		container_of(head, struct rcu_boost_inflight, rcu);
 
-	smp_mb(); /* Ensure RCU-core accesses precede clearing ->inflight */
-	rbip->inflight = 0;
+	/* Ensure RCU-core accesses precede clearing ->inflight */
+	smp_store_release(&rbip->inflight, 0);
 }
 
 static int rcu_torture_boost(void *arg)
@@ -710,9 +710,9 @@ static int rcu_torture_boost(void *arg)
 		call_rcu_time = jiffies;
 		while (ULONG_CMP_LT(jiffies, endtime)) {
 			/* If we don't have a callback in flight, post one. */
-			if (!rbi.inflight) {
-				smp_mb(); /* RCU core before ->inflight = 1. */
-				rbi.inflight = 1;
+			if (!smp_load_acquire(&rbi.inflight)) {
+				/* RCU core before ->inflight = 1. */
+				smp_store_release(&rbi.inflight, 1);
 				call_rcu(&rbi.rcu, rcu_torture_boost_cb);
 				if (jiffies - call_rcu_time >
 					 test_boost_duration * HZ - HZ / 2) {
@@ -751,11 +751,10 @@ checkwait:	stutter_wait("rcu_torture_boost");
 	} while (!torture_must_stop());
 
 	/* Clean up and exit. */
-	while (!kthread_should_stop() || rbi.inflight) {
+	while (!kthread_should_stop() || smp_load_acquire(&rbi.inflight)) {
 		torture_shutdown_absorb("rcu_torture_boost");
 		schedule_timeout_uninterruptible(1);
 	}
-	smp_mb(); /* order accesses to ->inflight before stack-frame death. */
 	destroy_rcu_head_on_stack(&rbi.rcu);
 	torture_kthread_stopping("rcu_torture_boost");
 	return 0;
@@ -1413,12 +1412,15 @@ static int rcu_torture_barrier_cbs(void *arg)
 	do {
 		wait_event(barrier_cbs_wq[myid],
 			   (newphase =
-			    READ_ONCE(barrier_phase)) != lastphase ||
+			    smp_load_acquire(&barrier_phase)) != lastphase ||
 			   torture_must_stop());
 		lastphase = newphase;
-		smp_mb(); /* ensure barrier_phase load before ->call(). */
 		if (torture_must_stop())
 			break;
+		/*
+		 * The above smp_load_acquire() ensures barrier_phase load
+		 * is ordered before the folloiwng ->call().
+		 */
 		cur_ops->call(&rcu, rcu_torture_barrier_cbf);
 		if (atomic_dec_and_test(&barrier_cbs_count))
 			wake_up(&barrier_wq);
@@ -1439,8 +1441,8 @@ static int rcu_torture_barrier(void *arg)
 	do {
 		atomic_set(&barrier_cbs_invoked, 0);
 		atomic_set(&barrier_cbs_count, n_barrier_cbs);
-		smp_mb(); /* Ensure barrier_phase after prior assignments. */
-		barrier_phase = !barrier_phase;
+		/* Ensure barrier_phase ordered after prior assignments. */
+		smp_store_release(&barrier_phase, !barrier_phase);
 		for (i = 0; i < n_barrier_cbs; i++)
 			wake_up(&barrier_cbs_wq[i]);
 		wait_event(barrier_wq,
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 07/13] rcutorture: Test SRCU cleanup code path
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (4 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 06/13] rcutorture: Replace barriers with smp_store_release() and smp_load_acquire() Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 08/13] rcutorture: TASKS_RCU set directly, so don't explicitly set it Paul E. McKenney
                     ` (5 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

The current rcutorture testing does not do any cleanup operations.
This works because the srcu_struct is statically allocated, but it
does represent a memory leak of the associated dynamically allocated
->per_cpu_ref per-CPU variables.  However, rcutorture currently uses
a statically allocated srcu_struct, which cannot legally be passed to
cleanup_srcu_struct().  Therefore, this commit adds a second form
of srcu (called srcud) that dynamically allocates and frees the
associated per-CPU variables.  This commit also adds a ->cleanup()
member to rcu_torture_ops that is invoked at the end of the test,
after ->cb_barriers().  This ->cleanup() pointer is NULL for all
existing tests, and thus only used for scrud.  Finally, the SRCU-P
torture-test configuration selects scrud instead of srcu, with SRCU-N
continuing to use srcu, thereby testing both static and dynamic
srcu_struct structures.

Reported-by: "Ahmed, Iftekhar" <ahmedi@onid.oregonstate.edu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/rcutorture.c                            | 77 ++++++++++++++++------
 .../selftests/rcutorture/configs/rcu/SRCU-P.boot   |  2 +-
 2 files changed, 59 insertions(+), 20 deletions(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 90ff8dfc51e5..59e32684c23b 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -241,6 +241,7 @@ rcu_torture_free(struct rcu_torture *p)
 struct rcu_torture_ops {
 	int ttype;
 	void (*init)(void);
+	void (*cleanup)(void);
 	int (*readlock)(void);
 	void (*read_delay)(struct torture_random_state *rrsp);
 	void (*readunlock)(int idx);
@@ -477,10 +478,12 @@ static struct rcu_torture_ops rcu_busted_ops = {
  */
 
 DEFINE_STATIC_SRCU(srcu_ctl);
+static struct srcu_struct srcu_ctld;
+static struct srcu_struct *srcu_ctlp = &srcu_ctl;
 
-static int srcu_torture_read_lock(void) __acquires(&srcu_ctl)
+static int srcu_torture_read_lock(void) __acquires(srcu_ctlp)
 {
-	return srcu_read_lock(&srcu_ctl);
+	return srcu_read_lock(srcu_ctlp);
 }
 
 static void srcu_read_delay(struct torture_random_state *rrsp)
@@ -499,49 +502,49 @@ static void srcu_read_delay(struct torture_random_state *rrsp)
 		rcu_read_delay(rrsp);
 }
 
-static void srcu_torture_read_unlock(int idx) __releases(&srcu_ctl)
+static void srcu_torture_read_unlock(int idx) __releases(srcu_ctlp)
 {
-	srcu_read_unlock(&srcu_ctl, idx);
+	srcu_read_unlock(srcu_ctlp, idx);
 }
 
 static unsigned long srcu_torture_completed(void)
 {
-	return srcu_batches_completed(&srcu_ctl);
+	return srcu_batches_completed(srcu_ctlp);
 }
 
 static void srcu_torture_deferred_free(struct rcu_torture *rp)
 {
-	call_srcu(&srcu_ctl, &rp->rtort_rcu, rcu_torture_cb);
+	call_srcu(srcu_ctlp, &rp->rtort_rcu, rcu_torture_cb);
 }
 
 static void srcu_torture_synchronize(void)
 {
-	synchronize_srcu(&srcu_ctl);
+	synchronize_srcu(srcu_ctlp);
 }
 
 static void srcu_torture_call(struct rcu_head *head,
 			      void (*func)(struct rcu_head *head))
 {
-	call_srcu(&srcu_ctl, head, func);
+	call_srcu(srcu_ctlp, head, func);
 }
 
 static void srcu_torture_barrier(void)
 {
-	srcu_barrier(&srcu_ctl);
+	srcu_barrier(srcu_ctlp);
 }
 
 static void srcu_torture_stats(void)
 {
 	int cpu;
-	int idx = srcu_ctl.completed & 0x1;
+	int idx = srcu_ctlp->completed & 0x1;
 
 	pr_alert("%s%s per-CPU(idx=%d):",
 		 torture_type, TORTURE_FLAG, idx);
 	for_each_possible_cpu(cpu) {
 		long c0, c1;
 
-		c0 = (long)per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[!idx];
-		c1 = (long)per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[idx];
+		c0 = (long)per_cpu_ptr(srcu_ctlp->per_cpu_ref, cpu)->c[!idx];
+		c1 = (long)per_cpu_ptr(srcu_ctlp->per_cpu_ref, cpu)->c[idx];
 		pr_cont(" %d(%ld,%ld)", cpu, c0, c1);
 	}
 	pr_cont("\n");
@@ -549,7 +552,7 @@ static void srcu_torture_stats(void)
 
 static void srcu_torture_synchronize_expedited(void)
 {
-	synchronize_srcu_expedited(&srcu_ctl);
+	synchronize_srcu_expedited(srcu_ctlp);
 }
 
 static struct rcu_torture_ops srcu_ops = {
@@ -569,6 +572,38 @@ static struct rcu_torture_ops srcu_ops = {
 	.name		= "srcu"
 };
 
+static void srcu_torture_init(void)
+{
+	rcu_sync_torture_init();
+	WARN_ON(init_srcu_struct(&srcu_ctld));
+	srcu_ctlp = &srcu_ctld;
+}
+
+static void srcu_torture_cleanup(void)
+{
+	cleanup_srcu_struct(&srcu_ctld);
+	srcu_ctlp = &srcu_ctl; /* In case of a later rcutorture run. */
+}
+
+/* As above, but dynamically allocated. */
+static struct rcu_torture_ops srcud_ops = {
+	.ttype		= SRCU_FLAVOR,
+	.init		= srcu_torture_init,
+	.cleanup	= srcu_torture_cleanup,
+	.readlock	= srcu_torture_read_lock,
+	.read_delay	= srcu_read_delay,
+	.readunlock	= srcu_torture_read_unlock,
+	.started	= NULL,
+	.completed	= srcu_torture_completed,
+	.deferred_free	= srcu_torture_deferred_free,
+	.sync		= srcu_torture_synchronize,
+	.exp_sync	= srcu_torture_synchronize_expedited,
+	.call		= srcu_torture_call,
+	.cb_barrier	= srcu_torture_barrier,
+	.stats		= srcu_torture_stats,
+	.name		= "srcud"
+};
+
 /*
  * Definitions for sched torture testing.
  */
@@ -1053,7 +1088,7 @@ static void rcu_torture_timer(unsigned long unused)
 	p = rcu_dereference_check(rcu_torture_current,
 				  rcu_read_lock_bh_held() ||
 				  rcu_read_lock_sched_held() ||
-				  srcu_read_lock_held(&srcu_ctl));
+				  srcu_read_lock_held(srcu_ctlp));
 	if (p == NULL) {
 		/* Leave because rcu_torture_writer is not yet underway */
 		cur_ops->readunlock(idx);
@@ -1127,7 +1162,7 @@ rcu_torture_reader(void *arg)
 		p = rcu_dereference_check(rcu_torture_current,
 					  rcu_read_lock_bh_held() ||
 					  rcu_read_lock_sched_held() ||
-					  srcu_read_lock_held(&srcu_ctl));
+					  srcu_read_lock_held(srcu_ctlp));
 		if (p == NULL) {
 			/* Wait for rcu_torture_writer to get underway */
 			cur_ops->readunlock(idx);
@@ -1590,10 +1625,14 @@ rcu_torture_cleanup(void)
 			rcutorture_booster_cleanup(i);
 	}
 
-	/* Wait for all RCU callbacks to fire.  */
-
+	/*
+	 * Wait for all RCU callbacks to fire, then do flavor-specific
+	 * cleanup operations.
+	 */
 	if (cur_ops->cb_barrier != NULL)
 		cur_ops->cb_barrier();
+	if (cur_ops->cleanup != NULL)
+		cur_ops->cleanup();
 
 	rcu_torture_stats_print();  /* -After- the stats thread is stopped! */
 
@@ -1670,8 +1709,8 @@ rcu_torture_init(void)
 	int cpu;
 	int firsterr = 0;
 	static struct rcu_torture_ops *torture_ops[] = {
-		&rcu_ops, &rcu_bh_ops, &rcu_busted_ops, &srcu_ops, &sched_ops,
-		RCUTORTURE_TASKS_OPS
+		&rcu_ops, &rcu_bh_ops, &rcu_busted_ops, &srcu_ops, &srcud_ops,
+		&sched_ops, RCUTORTURE_TASKS_OPS
 	};
 
 	if (!torture_init_begin(torture_type, verbose, &torture_runnable))
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
index 238bfe3bd0cc..84a7d51b7481 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
@@ -1 +1 @@
-rcutorture.torture_type=srcu
+rcutorture.torture_type=srcud
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 08/13] rcutorture: TASKS_RCU set directly, so don't explicitly set it
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (5 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 07/13] rcutorture: Test SRCU cleanup code path Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 09/13] rcutorture: Update configuration fragments for rcutree.rcu_fanout_exact Paul E. McKenney
                     ` (4 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

The TASKS01, TASKS02, and TASKS03 rcutorture config fragments currently
set CONFIG_TASKS_RCU.  However, now that the value of this Kconfig
parameter is set via "select" statements, it is no longer necessary to
set it explicitly.  This commit therefore removes it from the Kconfig
fragments.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tools/testing/selftests/rcutorture/configs/rcu/TASKS01 | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TASKS02 | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TASKS03 | 1 -
 3 files changed, 3 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
index 97f0a0b27ef7..32c5de503316 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
@@ -6,4 +6,3 @@ CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=y
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_PROVE_RCU=y
-CONFIG_TASKS_RCU=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS02 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS02
index 696d2ea74d13..ad2be91e5ee7 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS02
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS02
@@ -2,4 +2,3 @@ CONFIG_SMP=n
 CONFIG_PREEMPT_NONE=y
 CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=n
-CONFIG_TASKS_RCU=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS03 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS03
index 9c60da5b5d1d..111494018301 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS03
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS03
@@ -6,7 +6,6 @@ CONFIG_HIBERNATION=n
 CONFIG_PREEMPT_NONE=n
 CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=y
-CONFIG_TASKS_RCU=y
 CONFIG_HZ_PERIODIC=n
 CONFIG_NO_HZ_IDLE=n
 CONFIG_NO_HZ_FULL=y
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 09/13] rcutorture: Update configuration fragments for rcutree.rcu_fanout_exact
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (6 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 08/13] rcutorture: TASKS_RCU set directly, so don't explicitly set it Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 10/13] rcutorture: Make rcutorture scripts force RCU_EXPERT Paul E. McKenney
                     ` (3 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

This commit updates rcutortures configuration-fragment files to account
for the move from the CONFIG_RCU_FANOUT_EXACT Kconfig parameter to the
new rcutree.rcu_fanout_exact= boot parameter.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tools/testing/selftests/rcutorture/configs/rcu/TREE02        | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE02-T      | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE03        | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE04        | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE05        | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE06        | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot   | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE07        | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE08        | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE08-T      | 1 -
 tools/testing/selftests/rcutorture/configs/rcu/TREE08-T.boot | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot   | 1 +
 12 files changed, 3 insertions(+), 9 deletions(-)
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TREE08-T.boot

diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE02 b/tools/testing/selftests/rcutorture/configs/rcu/TREE02
index 629122fb8b4a..ea131cc5f7dd 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE02
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE02
@@ -14,7 +14,6 @@ CONFIG_SUSPEND=n
 CONFIG_HIBERNATION=n
 CONFIG_RCU_FANOUT=3
 CONFIG_RCU_FANOUT_LEAF=3
-CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_PROVE_LOCKING=n
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE02-T b/tools/testing/selftests/rcutorture/configs/rcu/TREE02-T
index a25de47888a4..2ac9e68ea3d1 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE02-T
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE02-T
@@ -14,7 +14,6 @@ CONFIG_SUSPEND=n
 CONFIG_HIBERNATION=n
 CONFIG_RCU_FANOUT=3
 CONFIG_RCU_FANOUT_LEAF=3
-CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_PROVE_LOCKING=n
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE03 b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
index 05a81380a5c2..d75d986fa688 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE03
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
@@ -11,7 +11,6 @@ CONFIG_RCU_TRACE=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_RCU_FANOUT=2
 CONFIG_RCU_FANOUT_LEAF=2
-CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_RCU_CPU_STALL_INFO=n
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
index 4eb6d374a0ca..30b0a5679e48 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
@@ -15,7 +15,6 @@ CONFIG_SUSPEND=n
 CONFIG_HIBERNATION=n
 CONFIG_RCU_FANOUT=4
 CONFIG_RCU_FANOUT_LEAF=4
-CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_RCU_CPU_STALL_INFO=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE05 b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
index 212e3bfd2b2a..79572319896f 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE05
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
@@ -12,7 +12,6 @@ CONFIG_RCU_TRACE=n
 CONFIG_HOTPLUG_CPU=y
 CONFIG_RCU_FANOUT=6
 CONFIG_RCU_FANOUT_LEAF=6
-CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=y
 CONFIG_RCU_NOCB_CPU_NONE=y
 CONFIG_DEBUG_LOCK_ALLOC=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
index 7eee63b44218..b94c400def4a 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
@@ -14,7 +14,6 @@ CONFIG_SUSPEND=n
 CONFIG_HIBERNATION=n
 CONFIG_RCU_FANOUT=6
 CONFIG_RCU_FANOUT_LEAF=6
-CONFIG_RCU_FANOUT_EXACT=y
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_PROVE_LOCKING=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot
index da9a03a398db..dd90f28ed700 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot
@@ -1,3 +1,4 @@
 rcupdate.rcu_self_test=1
 rcupdate.rcu_self_test_bh=1
 rcupdate.rcu_self_test_sched=1
+rcutree.rcu_fanout_exact=1
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
index 92a97fa97dec..d715f99c3297 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE07
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
@@ -15,7 +15,6 @@ CONFIG_RCU_TRACE=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_RCU_FANOUT=2
 CONFIG_RCU_FANOUT_LEAF=2
-CONFIG_RCU_FANOUT_EXACT=n
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_RCU_CPU_STALL_INFO=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
index acce6552f7f0..5f77ebeec4d1 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
@@ -13,7 +13,6 @@ CONFIG_HOTPLUG_CPU=n
 CONFIG_SUSPEND=n
 CONFIG_HIBERNATION=n
 CONFIG_RCU_FANOUT=3
-CONFIG_RCU_FANOUT_EXACT=y
 CONFIG_RCU_FANOUT_LEAF=2
 CONFIG_RCU_NOCB_CPU=y
 CONFIG_RCU_NOCB_CPU_ALL=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T b/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T
index 3eaeccacb083..b2b8cea69dc9 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T
@@ -13,7 +13,6 @@ CONFIG_HOTPLUG_CPU=n
 CONFIG_SUSPEND=n
 CONFIG_HIBERNATION=n
 CONFIG_RCU_FANOUT=3
-CONFIG_RCU_FANOUT_EXACT=y
 CONFIG_RCU_FANOUT_LEAF=2
 CONFIG_RCU_NOCB_CPU=y
 CONFIG_RCU_NOCB_CPU_ALL=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T.boot
new file mode 100644
index 000000000000..883149b5f2d1
--- /dev/null
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08-T.boot
@@ -0,0 +1 @@
+rcutree.rcu_fanout_exact=1
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot
index 2561daf605ad..fb066dc82769 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot
@@ -1,3 +1,4 @@
 rcutorture.torture_type=sched
 rcupdate.rcu_self_test=1
 rcupdate.rcu_self_test_sched=1
+rcutree.rcu_fanout_exact=1
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 10/13] rcutorture: Make rcutorture scripts force RCU_EXPERT
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (7 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 09/13] rcutorture: Update configuration fragments for rcutree.rcu_fanout_exact Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt Paul E. McKenney
                     ` (2 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

This commit causes the rcutorture scripts to force RCU_EXPERT so that
these scripts can cause rcutorture to torture RCU in the various required
configurations.  However, SRCU-P, TASKS03, and TREE09 retain !RCU_EXPERT
in order to ensure testing of the vanilla configuration.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tools/testing/selftests/rcutorture/configs/rcu/SRCU-N  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/SRCU-P  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TASKS01 | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TASKS03 | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE01  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE02  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE03  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE04  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE05  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE06  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE07  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE08  | 1 +
 tools/testing/selftests/rcutorture/configs/rcu/TREE09  | 1 +
 13 files changed, 13 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N
index 9fbb41b9b314..1a087c3c8bb8 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N
+++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N
@@ -5,3 +5,4 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_PREEMPT_NONE=y
 CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P
index 4b6f272dba27..4837430a71c0 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P
+++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P
@@ -5,3 +5,4 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_PREEMPT_NONE=n
 CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=y
+#CHECK#CONFIG_RCU_EXPERT=n
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
index 32c5de503316..9318de8d5e88 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
@@ -6,3 +6,4 @@ CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=y
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_PROVE_RCU=y
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS03 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS03
index 111494018301..c70c51d5ded1 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS03
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS03
@@ -10,3 +10,4 @@ CONFIG_HZ_PERIODIC=n
 CONFIG_NO_HZ_IDLE=n
 CONFIG_NO_HZ_FULL=y
 CONFIG_NO_HZ_FULL_ALL=y
+#CHECK#CONFIG_RCU_EXPERT=n
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE01 b/tools/testing/selftests/rcutorture/configs/rcu/TREE01
index f8a10a7500c6..8e9137f66831 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE01
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE01
@@ -16,3 +16,4 @@ CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_RCU_BOOST=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE02 b/tools/testing/selftests/rcutorture/configs/rcu/TREE02
index ea131cc5f7dd..aeea6a204d14 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE02
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE02
@@ -20,3 +20,4 @@ CONFIG_PROVE_LOCKING=n
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_RCU_BOOST=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE03 b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
index d75d986fa688..72aa7d87ea99 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE03
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE03
@@ -17,3 +17,4 @@ CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_RCU_BOOST=y
 CONFIG_RCU_KTHREAD_PRIO=2
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
index 30b0a5679e48..d34e4b05941f 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
@@ -19,3 +19,4 @@ CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_RCU_CPU_STALL_INFO=y
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE05 b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
index 79572319896f..2f9b93a777dd 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE05
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
@@ -19,3 +19,4 @@ CONFIG_PROVE_LOCKING=y
 CONFIG_PROVE_RCU=y
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
index b94c400def4a..f7b2e87af79a 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
@@ -20,3 +20,4 @@ CONFIG_PROVE_LOCKING=y
 CONFIG_PROVE_RCU=y
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
index d715f99c3297..ce18d597b553 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE07
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
@@ -19,3 +19,4 @@ CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_RCU_CPU_STALL_INFO=y
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
index 5f77ebeec4d1..fc1fed642917 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
@@ -22,3 +22,4 @@ CONFIG_PROVE_RCU=y
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_RCU_BOOST=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE09 b/tools/testing/selftests/rcutorture/configs/rcu/TREE09
index 6076b36f6c0b..aa4ed08d999d 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE09
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE09
@@ -16,3 +16,4 @@ CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_RCU_BOOST=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
+#CHECK#CONFIG_RCU_EXPERT=n
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (8 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 10/13] rcutorture: Make rcutorture scripts force RCU_EXPERT Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-13  1:06     ` josh
  2015-05-12 22:58   ` [PATCH tip/core/rcu 12/13] rcutorture: Display "make oldconfig" errors Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 13/13] rcutorture: Allow repetition factors in Kconfig-fragment lists Paul E. McKenney
  11 siblings, 1 reply; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

This commit updates TREE_RCU-kconfig.txt to reflect changes in RCU's
Kconfig setup.  This commit also updates rcutorture's Kconfig fragments
to account for Kconfig parameters that are now driven directly off of
other Kconfig parameters.

Reported-by: Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 .../selftests/rcutorture/configs/rcu/TASKS01       |  3 +-
 .../selftests/rcutorture/configs/rcu/TINY02        |  2 +-
 .../selftests/rcutorture/configs/rcu/TREE04        |  2 +-
 .../selftests/rcutorture/configs/rcu/TREE05        |  2 +-
 .../selftests/rcutorture/configs/rcu/TREE06        |  2 +-
 .../selftests/rcutorture/configs/rcu/TREE07        |  2 +-
 .../selftests/rcutorture/configs/rcu/TREE08        |  2 +-
 .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt  | 36 ++++++++--------------
 8 files changed, 21 insertions(+), 30 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
index 9318de8d5e88..2cc0e60eba6e 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
@@ -5,5 +5,6 @@ CONFIG_PREEMPT_NONE=n
 CONFIG_PREEMPT_VOLUNTARY=n
 CONFIG_PREEMPT=y
 CONFIG_DEBUG_LOCK_ALLOC=y
-CONFIG_PROVE_RCU=y
+CONFIG_PROVE_LOCKING=n
+#CHECK#CONFIG_PROVE_RCU=n
 CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TINY02 b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
index 36e41df3d27a..f1892e0371c9 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TINY02
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
@@ -8,7 +8,7 @@ CONFIG_NO_HZ_IDLE=n
 CONFIG_NO_HZ_FULL=n
 CONFIG_RCU_TRACE=y
 CONFIG_PROVE_LOCKING=y
-CONFIG_PROVE_RCU=y
+#CHECK#CONFIG_PROVE_RCU=y
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
 CONFIG_PREEMPT_COUNT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
index d34e4b05941f..3f5112751cda 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
@@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=4
 CONFIG_RCU_FANOUT_LEAF=4
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
-CONFIG_RCU_CPU_STALL_INFO=y
+CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
 CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE05 b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
index 2f9b93a777dd..c04dfea6fd21 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE05
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
@@ -16,7 +16,7 @@ CONFIG_RCU_NOCB_CPU=y
 CONFIG_RCU_NOCB_CPU_NONE=y
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_PROVE_LOCKING=y
-CONFIG_PROVE_RCU=y
+#CHECK#CONFIG_PROVE_RCU=y
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
 CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
index f7b2e87af79a..f51d2c73a68e 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
@@ -17,7 +17,7 @@ CONFIG_RCU_FANOUT_LEAF=6
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_PROVE_LOCKING=y
-CONFIG_PROVE_RCU=y
+#CHECK#CONFIG_PROVE_RCU=y
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
 CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
index ce18d597b553..f422af4ff5a3 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE07
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
@@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=2
 CONFIG_RCU_FANOUT_LEAF=2
 CONFIG_RCU_NOCB_CPU=n
 CONFIG_DEBUG_LOCK_ALLOC=n
-CONFIG_RCU_CPU_STALL_INFO=y
+CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
 CONFIG_RCU_EXPERT=y
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
index fc1fed642917..a24d2ca30646 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
@@ -18,7 +18,7 @@ CONFIG_RCU_NOCB_CPU=y
 CONFIG_RCU_NOCB_CPU_ALL=y
 CONFIG_DEBUG_LOCK_ALLOC=n
 CONFIG_PROVE_LOCKING=y
-CONFIG_PROVE_RCU=y
+#CHECK#CONFIG_PROVE_RCU=y
 CONFIG_RCU_CPU_STALL_INFO=n
 CONFIG_RCU_BOOST=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
index ec03c883db00..b24c0004fc49 100644
--- a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
+++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
@@ -12,13 +12,12 @@ CONFIG_NO_HZ_IDLE -- Do those not otherwise specified. (Groups of two.)
 CONFIG_NO_HZ_FULL -- Do two, one with CONFIG_NO_HZ_FULL_SYSIDLE.
 CONFIG_NO_HZ_FULL_SYSIDLE -- Do one.
 CONFIG_PREEMPT -- Do half.  (First three and #8.)
-CONFIG_PROVE_LOCKING -- Do all but two, covering CONFIG_PROVE_RCU and not.
-CONFIG_PROVE_RCU -- Do all but one under CONFIG_PROVE_LOCKING.
+CONFIG_PROVE_LOCKING -- Do several, covering CONFIG_DEBUG_LOCK_ALLOC=y and not.
+CONFIG_PROVE_RCU -- Hardwired to CONFIG_PROVE_LOCKING.
 CONFIG_RCU_BOOST -- one of PREEMPT_RCU.
 CONFIG_RCU_KTHREAD_PRIO -- set to 2 for _BOOST testing.
-CONFIG_RCU_CPU_STALL_INFO -- Do one.
-CONFIG_RCU_FANOUT -- Cover hierarchy as currently, but overlap with others.
-CONFIG_RCU_FANOUT_EXACT -- Do one.
+CONFIG_RCU_CPU_STALL_INFO -- Now default, avoid at least twice.
+CONFIG_RCU_FANOUT -- Cover hierarchy, but overlap with others.
 CONFIG_RCU_FANOUT_LEAF -- Do one non-default.
 CONFIG_RCU_FAST_NO_HZ -- Do one, but not with CONFIG_RCU_NOCB_CPU_ALL.
 CONFIG_RCU_NOCB_CPU -- Do three, see below.
@@ -27,28 +26,19 @@ CONFIG_RCU_NOCB_CPU_NONE -- Do one.
 CONFIG_RCU_NOCB_CPU_ZERO -- Do one.
 CONFIG_RCU_TRACE -- Do half.
 CONFIG_SMP -- Need one !SMP for PREEMPT_RCU.
+!RCU_EXPERT -- Do a few, but these have to be vanilla configurations.
 RCU-bh: Do one with PREEMPT and one with !PREEMPT.
 RCU-sched: Do one with PREEMPT but not BOOST.
 
 
-Hierarchy:
-
-TREE01.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=8, CONFIG_RCU_FANOUT_EXACT=n.
-TREE02.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=n,
-	CONFIG_RCU_FANOUT_LEAF=3.
-TREE03.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=4, CONFIG_RCU_FANOUT_EXACT=n,
-	CONFIG_RCU_FANOUT_LEAF=4.
-TREE04.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
-	CONFIG_RCU_FANOUT_LEAF=2.
-TREE05.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=n
-	CONFIG_RCU_FANOUT_LEAF=6.
-TREE06.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=y
-	CONFIG_RCU_FANOUT_LEAF=6.
-TREE07.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
-	CONFIG_RCU_FANOUT_LEAF=2.
-TREE08.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=y,
-	CONFIG_RCU_FANOUT_LEAF=2.
-TREE09.	CONFIG_NR_CPUS=1.
+Boot parameters:
+
+nohz_full - do at least one.
+maxcpu -- do at least one.
+rcupdate.rcu_self_test_bh -- Do at least one each, offloaded and not.
+rcupdate.rcu_self_test_sched -- Do at least one each, offloaded and not.
+rcupdate.rcu_self_test -- Do at least one each, offloaded and not.
+rcutree.rcu_fanout_exact -- Do at least one.
 
 
 Kconfig Parameters Ignored:
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 12/13] rcutorture: Display "make oldconfig" errors
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (9 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  2015-05-12 22:58   ` [PATCH tip/core/rcu 13/13] rcutorture: Allow repetition factors in Kconfig-fragment lists Paul E. McKenney
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

The current rcutorture scripting fails to dump out errors from
"make oldconfig", so this commit addresses this issue.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 tools/testing/selftests/rcutorture/bin/configinit.sh  | 2 +-
 tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh
index 15f1a17ca96e..3f81a1095206 100755
--- a/tools/testing/selftests/rcutorture/bin/configinit.sh
+++ b/tools/testing/selftests/rcutorture/bin/configinit.sh
@@ -66,7 +66,7 @@ make $buildloc $TORTURE_DEFCONFIG > $builddir/Make.defconfig.out 2>&1
 mv $builddir/.config $builddir/.config.sav
 sh $T/upd.sh < $builddir/.config.sav > $builddir/.config
 cp $builddir/.config $builddir/.config.new
-yes '' | make $buildloc oldconfig > $builddir/Make.modconfig.out 2>&1
+yes '' | make $buildloc oldconfig > $builddir/Make.oldconfig.out 2> $builddir/Make.oldconfig.err
 
 # verify new config matches specification.
 configcheck.sh $builddir/.config $c
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
index 4f5b20f367a9..d86bdd6b6cc2 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
@@ -43,6 +43,10 @@ do
 		if test -f "$i/console.log"
 		then
 			configcheck.sh $i/.config $i/ConfigFragment
+			if test -r $i/Make.oldconfig.err
+			then
+				cat $i/Make.oldconfig.err
+			fi
 			parse-build.sh $i/Make.out $configfile
 			parse-torture.sh $i/console.log $configfile
 			parse-console.sh $i/console.log $configfile
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH tip/core/rcu 13/13] rcutorture: Allow repetition factors in Kconfig-fragment lists
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
                     ` (10 preceding siblings ...)
  2015-05-12 22:58   ` [PATCH tip/core/rcu 12/13] rcutorture: Display "make oldconfig" errors Paul E. McKenney
@ 2015-05-12 22:58   ` Paul E. McKenney
  11 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-12 22:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
	peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

Although it is currently possible to run the same test in parallel,
'--config "TINY01 TINY01 TINY01"' can get a bit verbose, especially
if you want to run 48 instances of TINY01 in parallel.  This commit
therefore allows prefixing the Kconfig fragment with a repeat count,
for example, '--config "48*TINY01"' to run 48 instances in parallel.
At least assuming that you have 48 CPUs and also gave '--cpus 48'.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index dd2812ceb0ba..fbe2dbff1e21 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -55,7 +55,7 @@ usage () {
 	echo "       --bootargs kernel-boot-arguments"
 	echo "       --bootimage relative-path-to-kernel-boot-image"
 	echo "       --buildonly"
-	echo "       --configs \"config-file list\""
+	echo "       --configs \"config-file list w/ repeat factor (3*TINY01)\""
 	echo "       --cpus N"
 	echo "       --datestamp string"
 	echo "       --defconfig string"
@@ -178,13 +178,26 @@ fi
 touch $T/cfgcpu
 for CF in $configs
 do
-	if test -f "$CONFIGFRAG/$CF"
+	case $CF in
+	[0-9]\**|[0-9][0-9]\**|[0-9][0-9][0-9]\**)
+		config_reps=`echo $CF | sed -e 's/\*.*$//'`
+		CF1=`echo $CF | sed -e 's/^[^*]*\*//'`
+		;;
+	*)
+		config_reps=1
+		CF1=$CF
+		;;
+	esac
+	if test -f "$CONFIGFRAG/$CF1"
 	then
-		cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF`
-		cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF" "$cpu_count"`
-		echo $CF $cpu_count >> $T/cfgcpu
+		cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF1`
+		cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
+		for ((cur_rep=0;cur_rep<$config_reps;cur_rep++))
+		do
+			echo $CF1 $cpu_count >> $T/cfgcpu
+		done
 	else
-		echo "The --configs file $CF does not exist, terminating."
+		echo "The --configs file $CF1 does not exist, terminating."
 		exit 1
 	fi
 done
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe
  2015-05-12 22:58   ` [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe Paul E. McKenney
@ 2015-05-13  1:03     ` josh
  2015-05-13 17:23       ` Paul E. McKenney
  0 siblings, 1 reply; 20+ messages in thread
From: josh @ 2015-05-13  1:03 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec,
	oleg, bobby.prani

On Tue, May 12, 2015 at 03:58:04PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> 
> By default, with rcutorture.nreaders equal to -1, rcutorture provisions
> N-1 reader kthreads, where N is the number of CPUs.  This avoids
> rcutorture-induced stalls, but also avoids heavier levels of torture.
> This commit therefore allows negative values of rcutorture.nreaders
> to specify larger numbers of reader kthreads, so that for example
> rcutorture.nreaders=-2 provisions N kthreads and rcutorture.nreaders=-5
> provisions N+3 kthreads.
> 
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

That seems rather excessively arcane.  Then again, I guess we started
down the road to arcana when we allowed -1 to mean N-1.

However, could you please document this in the module parameter
documentation?

>  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 a67ef6ff86b0..7294d605c481 100644
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -1701,7 +1701,7 @@ rcu_torture_init(void)
>  	if (nreaders >= 0) {
>  		nrealreaders = nreaders;
>  	} else {
> -		nrealreaders = num_online_cpus() - 1;
> +		nrealreaders = num_online_cpus() - 2 - nreaders;
>  		if (nrealreaders <= 0)
>  			nrealreaders = 1;
>  	}
> -- 
> 1.8.1.5
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt
  2015-05-12 22:58   ` [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt Paul E. McKenney
@ 2015-05-13  1:06     ` josh
  2015-05-13 17:28       ` Paul E. McKenney
  0 siblings, 1 reply; 20+ messages in thread
From: josh @ 2015-05-13  1:06 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec,
	oleg, bobby.prani

On Tue, May 12, 2015 at 03:58:11PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> 
> This commit updates TREE_RCU-kconfig.txt to reflect changes in RCU's
> Kconfig setup.  This commit also updates rcutorture's Kconfig fragments
> to account for Kconfig parameters that are now driven directly off of
> other Kconfig parameters.
> 
> Reported-by: Pranith Kumar <bobby.prani@gmail.com>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Can you please explain the #CHECK# prefix that this adds to several of
the configs?

>  .../selftests/rcutorture/configs/rcu/TASKS01       |  3 +-
>  .../selftests/rcutorture/configs/rcu/TINY02        |  2 +-
>  .../selftests/rcutorture/configs/rcu/TREE04        |  2 +-
>  .../selftests/rcutorture/configs/rcu/TREE05        |  2 +-
>  .../selftests/rcutorture/configs/rcu/TREE06        |  2 +-
>  .../selftests/rcutorture/configs/rcu/TREE07        |  2 +-
>  .../selftests/rcutorture/configs/rcu/TREE08        |  2 +-
>  .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt  | 36 ++++++++--------------
>  8 files changed, 21 insertions(+), 30 deletions(-)
> 
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> index 9318de8d5e88..2cc0e60eba6e 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> @@ -5,5 +5,6 @@ CONFIG_PREEMPT_NONE=n
>  CONFIG_PREEMPT_VOLUNTARY=n
>  CONFIG_PREEMPT=y
>  CONFIG_DEBUG_LOCK_ALLOC=y
> -CONFIG_PROVE_RCU=y
> +CONFIG_PROVE_LOCKING=n
> +#CHECK#CONFIG_PROVE_RCU=n
>  CONFIG_RCU_EXPERT=y
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TINY02 b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> index 36e41df3d27a..f1892e0371c9 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> @@ -8,7 +8,7 @@ CONFIG_NO_HZ_IDLE=n
>  CONFIG_NO_HZ_FULL=n
>  CONFIG_RCU_TRACE=y
>  CONFIG_PROVE_LOCKING=y
> -CONFIG_PROVE_RCU=y
> +#CHECK#CONFIG_PROVE_RCU=y
>  CONFIG_DEBUG_LOCK_ALLOC=y
>  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
>  CONFIG_PREEMPT_COUNT=y
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> index d34e4b05941f..3f5112751cda 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> @@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=4
>  CONFIG_RCU_FANOUT_LEAF=4
>  CONFIG_RCU_NOCB_CPU=n
>  CONFIG_DEBUG_LOCK_ALLOC=n
> -CONFIG_RCU_CPU_STALL_INFO=y
> +CONFIG_RCU_CPU_STALL_INFO=n
>  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
>  CONFIG_RCU_EXPERT=y
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE05 b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> index 2f9b93a777dd..c04dfea6fd21 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> @@ -16,7 +16,7 @@ CONFIG_RCU_NOCB_CPU=y
>  CONFIG_RCU_NOCB_CPU_NONE=y
>  CONFIG_DEBUG_LOCK_ALLOC=y
>  CONFIG_PROVE_LOCKING=y
> -CONFIG_PROVE_RCU=y
> +#CHECK#CONFIG_PROVE_RCU=y
>  CONFIG_RCU_CPU_STALL_INFO=n
>  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
>  CONFIG_RCU_EXPERT=y
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> index f7b2e87af79a..f51d2c73a68e 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> @@ -17,7 +17,7 @@ CONFIG_RCU_FANOUT_LEAF=6
>  CONFIG_RCU_NOCB_CPU=n
>  CONFIG_DEBUG_LOCK_ALLOC=y
>  CONFIG_PROVE_LOCKING=y
> -CONFIG_PROVE_RCU=y
> +#CHECK#CONFIG_PROVE_RCU=y
>  CONFIG_RCU_CPU_STALL_INFO=n
>  CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
>  CONFIG_RCU_EXPERT=y
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> index ce18d597b553..f422af4ff5a3 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> @@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=2
>  CONFIG_RCU_FANOUT_LEAF=2
>  CONFIG_RCU_NOCB_CPU=n
>  CONFIG_DEBUG_LOCK_ALLOC=n
> -CONFIG_RCU_CPU_STALL_INFO=y
> +CONFIG_RCU_CPU_STALL_INFO=n
>  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
>  CONFIG_RCU_EXPERT=y
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> index fc1fed642917..a24d2ca30646 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> @@ -18,7 +18,7 @@ CONFIG_RCU_NOCB_CPU=y
>  CONFIG_RCU_NOCB_CPU_ALL=y
>  CONFIG_DEBUG_LOCK_ALLOC=n
>  CONFIG_PROVE_LOCKING=y
> -CONFIG_PROVE_RCU=y
> +#CHECK#CONFIG_PROVE_RCU=y
>  CONFIG_RCU_CPU_STALL_INFO=n
>  CONFIG_RCU_BOOST=n
>  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> index ec03c883db00..b24c0004fc49 100644
> --- a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> +++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> @@ -12,13 +12,12 @@ CONFIG_NO_HZ_IDLE -- Do those not otherwise specified. (Groups of two.)
>  CONFIG_NO_HZ_FULL -- Do two, one with CONFIG_NO_HZ_FULL_SYSIDLE.
>  CONFIG_NO_HZ_FULL_SYSIDLE -- Do one.
>  CONFIG_PREEMPT -- Do half.  (First three and #8.)
> -CONFIG_PROVE_LOCKING -- Do all but two, covering CONFIG_PROVE_RCU and not.
> -CONFIG_PROVE_RCU -- Do all but one under CONFIG_PROVE_LOCKING.
> +CONFIG_PROVE_LOCKING -- Do several, covering CONFIG_DEBUG_LOCK_ALLOC=y and not.
> +CONFIG_PROVE_RCU -- Hardwired to CONFIG_PROVE_LOCKING.
>  CONFIG_RCU_BOOST -- one of PREEMPT_RCU.
>  CONFIG_RCU_KTHREAD_PRIO -- set to 2 for _BOOST testing.
> -CONFIG_RCU_CPU_STALL_INFO -- Do one.
> -CONFIG_RCU_FANOUT -- Cover hierarchy as currently, but overlap with others.
> -CONFIG_RCU_FANOUT_EXACT -- Do one.
> +CONFIG_RCU_CPU_STALL_INFO -- Now default, avoid at least twice.
> +CONFIG_RCU_FANOUT -- Cover hierarchy, but overlap with others.
>  CONFIG_RCU_FANOUT_LEAF -- Do one non-default.
>  CONFIG_RCU_FAST_NO_HZ -- Do one, but not with CONFIG_RCU_NOCB_CPU_ALL.
>  CONFIG_RCU_NOCB_CPU -- Do three, see below.
> @@ -27,28 +26,19 @@ CONFIG_RCU_NOCB_CPU_NONE -- Do one.
>  CONFIG_RCU_NOCB_CPU_ZERO -- Do one.
>  CONFIG_RCU_TRACE -- Do half.
>  CONFIG_SMP -- Need one !SMP for PREEMPT_RCU.
> +!RCU_EXPERT -- Do a few, but these have to be vanilla configurations.
>  RCU-bh: Do one with PREEMPT and one with !PREEMPT.
>  RCU-sched: Do one with PREEMPT but not BOOST.
>  
>  
> -Hierarchy:
> -
> -TREE01.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=8, CONFIG_RCU_FANOUT_EXACT=n.
> -TREE02.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=n,
> -	CONFIG_RCU_FANOUT_LEAF=3.
> -TREE03.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=4, CONFIG_RCU_FANOUT_EXACT=n,
> -	CONFIG_RCU_FANOUT_LEAF=4.
> -TREE04.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
> -	CONFIG_RCU_FANOUT_LEAF=2.
> -TREE05.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=n
> -	CONFIG_RCU_FANOUT_LEAF=6.
> -TREE06.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=y
> -	CONFIG_RCU_FANOUT_LEAF=6.
> -TREE07.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
> -	CONFIG_RCU_FANOUT_LEAF=2.
> -TREE08.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=y,
> -	CONFIG_RCU_FANOUT_LEAF=2.
> -TREE09.	CONFIG_NR_CPUS=1.
> +Boot parameters:
> +
> +nohz_full - do at least one.
> +maxcpu -- do at least one.
> +rcupdate.rcu_self_test_bh -- Do at least one each, offloaded and not.
> +rcupdate.rcu_self_test_sched -- Do at least one each, offloaded and not.
> +rcupdate.rcu_self_test -- Do at least one each, offloaded and not.
> +rcutree.rcu_fanout_exact -- Do at least one.
>  
>  
>  Kconfig Parameters Ignored:
> -- 
> 1.8.1.5
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2
  2015-05-12 22:57 [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 Paul E. McKenney
  2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
@ 2015-05-13  1:07 ` josh
  1 sibling, 0 replies; 20+ messages in thread
From: josh @ 2015-05-13  1:07 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec,
	oleg, bobby.prani

On Tue, May 12, 2015 at 03:57:53PM -0700, Paul E. McKenney wrote:
> Hello!
> 
> This series contains torture-test updates:
> 
> 1.	Use correct locking primitive, thus avoiding deadlock, courtesy
> 	of Alexey Kodanev.
> 
> 2.	Exchange TREE03 and TREE04 geometries in order to improve bug-location
> 	rates.
> 
> 3.	Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug to further
> 	improve bug-location rates.
> 
> 4.	Allow negative values of nreaders to in order to oversubscribe
> 	the CPUs, again to improve bug-location rates.
> 
> 5.	Change longdelay_us to longdelay_ms in order to better reflect
> 	reality.  (Not that gcc cares, but people reading the code just
> 	might.)
> 
> 6.	Replace open-coded memory barriers with the shiny new
> 	smp_store_release() and smp_load_acquire() primitives.
> 
> 7.	Test SRCU cleanup code path in order to improve test coverage.
> 
> 8.	Avoid explicitly setting CONFIG_TASKS_RCU, given that it is
> 	now set implicitly based on other configuration options.
> 
> 9.	Update configuration fragments from CONFIG_RCU_FANOUT_EXACT to
> 	the new rcutree.rcu_fanout_exact= boot parameter.
> 
> 10.	Make rcutorture scripts force RCU_EXPERT so that they can still
> 	build the needed kernel configurations.
> 
> 11.	Update TREE_RCU-kconfig.txt to describe new kernel-parameter
> 	setup.
> 
> 12.	Make torture scripts display "make oldconfig" errors
> 
> 13.	Allow repetition factors in Kconfig-fragment lists.  Because
> 	typing 48 repetitions of "TINY02" is getting old.

I replied to patches 4 and 11 with feedback.  For the rest:

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe
  2015-05-13  1:03     ` josh
@ 2015-05-13 17:23       ` Paul E. McKenney
  0 siblings, 0 replies; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-13 17:23 UTC (permalink / raw)
  To: josh
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec,
	oleg, bobby.prani

On Tue, May 12, 2015 at 06:03:13PM -0700, josh@joshtriplett.org wrote:
> On Tue, May 12, 2015 at 03:58:04PM -0700, Paul E. McKenney wrote:
> > From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > 
> > By default, with rcutorture.nreaders equal to -1, rcutorture provisions
> > N-1 reader kthreads, where N is the number of CPUs.  This avoids
> > rcutorture-induced stalls, but also avoids heavier levels of torture.
> > This commit therefore allows negative values of rcutorture.nreaders
> > to specify larger numbers of reader kthreads, so that for example
> > rcutorture.nreaders=-2 provisions N kthreads and rcutorture.nreaders=-5
> > provisions N+3 kthreads.
> > 
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> 
> That seems rather excessively arcane.  Then again, I guess we started
> down the road to arcana when we allowed -1 to mean N-1.

Indeed...

> However, could you please document this in the module parameter
> documentation?

Good point, fixed!

							Thanx, Paul

> >  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 a67ef6ff86b0..7294d605c481 100644
> > --- a/kernel/rcu/rcutorture.c
> > +++ b/kernel/rcu/rcutorture.c
> > @@ -1701,7 +1701,7 @@ rcu_torture_init(void)
> >  	if (nreaders >= 0) {
> >  		nrealreaders = nreaders;
> >  	} else {
> > -		nrealreaders = num_online_cpus() - 1;
> > +		nrealreaders = num_online_cpus() - 2 - nreaders;
> >  		if (nrealreaders <= 0)
> >  			nrealreaders = 1;
> >  	}
> > -- 
> > 1.8.1.5
> > 
> 


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt
  2015-05-13  1:06     ` josh
@ 2015-05-13 17:28       ` Paul E. McKenney
  2015-05-13 22:13         ` josh
  0 siblings, 1 reply; 20+ messages in thread
From: Paul E. McKenney @ 2015-05-13 17:28 UTC (permalink / raw)
  To: josh
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec,
	oleg, bobby.prani

On Tue, May 12, 2015 at 06:06:43PM -0700, josh@joshtriplett.org wrote:
> On Tue, May 12, 2015 at 03:58:11PM -0700, Paul E. McKenney wrote:
> > From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > 
> > This commit updates TREE_RCU-kconfig.txt to reflect changes in RCU's
> > Kconfig setup.  This commit also updates rcutorture's Kconfig fragments
> > to account for Kconfig parameters that are now driven directly off of
> > other Kconfig parameters.
> > 
> > Reported-by: Pranith Kumar <bobby.prani@gmail.com>
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> 
> Can you please explain the #CHECK# prefix that this adds to several of
> the configs?

I added the following paragraph to the commit log:

	The #CHECK# prefix tells the rcutorture scripts to take no action
	to try to set the Kconfig parameter, but to check that it does
	in fact get set.  This is useful for verifying that Kconfig
	parameters that are supposed to be automatically set do in fact
	get set to the required values.

Does that help?

							Thanx, Paul

> >  .../selftests/rcutorture/configs/rcu/TASKS01       |  3 +-
> >  .../selftests/rcutorture/configs/rcu/TINY02        |  2 +-
> >  .../selftests/rcutorture/configs/rcu/TREE04        |  2 +-
> >  .../selftests/rcutorture/configs/rcu/TREE05        |  2 +-
> >  .../selftests/rcutorture/configs/rcu/TREE06        |  2 +-
> >  .../selftests/rcutorture/configs/rcu/TREE07        |  2 +-
> >  .../selftests/rcutorture/configs/rcu/TREE08        |  2 +-
> >  .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt  | 36 ++++++++--------------
> >  8 files changed, 21 insertions(+), 30 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> > index 9318de8d5e88..2cc0e60eba6e 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> > @@ -5,5 +5,6 @@ CONFIG_PREEMPT_NONE=n
> >  CONFIG_PREEMPT_VOLUNTARY=n
> >  CONFIG_PREEMPT=y
> >  CONFIG_DEBUG_LOCK_ALLOC=y
> > -CONFIG_PROVE_RCU=y
> > +CONFIG_PROVE_LOCKING=n
> > +#CHECK#CONFIG_PROVE_RCU=n
> >  CONFIG_RCU_EXPERT=y
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TINY02 b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> > index 36e41df3d27a..f1892e0371c9 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> > @@ -8,7 +8,7 @@ CONFIG_NO_HZ_IDLE=n
> >  CONFIG_NO_HZ_FULL=n
> >  CONFIG_RCU_TRACE=y
> >  CONFIG_PROVE_LOCKING=y
> > -CONFIG_PROVE_RCU=y
> > +#CHECK#CONFIG_PROVE_RCU=y
> >  CONFIG_DEBUG_LOCK_ALLOC=y
> >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> >  CONFIG_PREEMPT_COUNT=y
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> > index d34e4b05941f..3f5112751cda 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> > @@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=4
> >  CONFIG_RCU_FANOUT_LEAF=4
> >  CONFIG_RCU_NOCB_CPU=n
> >  CONFIG_DEBUG_LOCK_ALLOC=n
> > -CONFIG_RCU_CPU_STALL_INFO=y
> > +CONFIG_RCU_CPU_STALL_INFO=n
> >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> >  CONFIG_RCU_EXPERT=y
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE05 b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> > index 2f9b93a777dd..c04dfea6fd21 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> > @@ -16,7 +16,7 @@ CONFIG_RCU_NOCB_CPU=y
> >  CONFIG_RCU_NOCB_CPU_NONE=y
> >  CONFIG_DEBUG_LOCK_ALLOC=y
> >  CONFIG_PROVE_LOCKING=y
> > -CONFIG_PROVE_RCU=y
> > +#CHECK#CONFIG_PROVE_RCU=y
> >  CONFIG_RCU_CPU_STALL_INFO=n
> >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> >  CONFIG_RCU_EXPERT=y
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> > index f7b2e87af79a..f51d2c73a68e 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> > @@ -17,7 +17,7 @@ CONFIG_RCU_FANOUT_LEAF=6
> >  CONFIG_RCU_NOCB_CPU=n
> >  CONFIG_DEBUG_LOCK_ALLOC=y
> >  CONFIG_PROVE_LOCKING=y
> > -CONFIG_PROVE_RCU=y
> > +#CHECK#CONFIG_PROVE_RCU=y
> >  CONFIG_RCU_CPU_STALL_INFO=n
> >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
> >  CONFIG_RCU_EXPERT=y
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> > index ce18d597b553..f422af4ff5a3 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> > @@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=2
> >  CONFIG_RCU_FANOUT_LEAF=2
> >  CONFIG_RCU_NOCB_CPU=n
> >  CONFIG_DEBUG_LOCK_ALLOC=n
> > -CONFIG_RCU_CPU_STALL_INFO=y
> > +CONFIG_RCU_CPU_STALL_INFO=n
> >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> >  CONFIG_RCU_EXPERT=y
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> > index fc1fed642917..a24d2ca30646 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> > @@ -18,7 +18,7 @@ CONFIG_RCU_NOCB_CPU=y
> >  CONFIG_RCU_NOCB_CPU_ALL=y
> >  CONFIG_DEBUG_LOCK_ALLOC=n
> >  CONFIG_PROVE_LOCKING=y
> > -CONFIG_PROVE_RCU=y
> > +#CHECK#CONFIG_PROVE_RCU=y
> >  CONFIG_RCU_CPU_STALL_INFO=n
> >  CONFIG_RCU_BOOST=n
> >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> > diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> > index ec03c883db00..b24c0004fc49 100644
> > --- a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> > +++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> > @@ -12,13 +12,12 @@ CONFIG_NO_HZ_IDLE -- Do those not otherwise specified. (Groups of two.)
> >  CONFIG_NO_HZ_FULL -- Do two, one with CONFIG_NO_HZ_FULL_SYSIDLE.
> >  CONFIG_NO_HZ_FULL_SYSIDLE -- Do one.
> >  CONFIG_PREEMPT -- Do half.  (First three and #8.)
> > -CONFIG_PROVE_LOCKING -- Do all but two, covering CONFIG_PROVE_RCU and not.
> > -CONFIG_PROVE_RCU -- Do all but one under CONFIG_PROVE_LOCKING.
> > +CONFIG_PROVE_LOCKING -- Do several, covering CONFIG_DEBUG_LOCK_ALLOC=y and not.
> > +CONFIG_PROVE_RCU -- Hardwired to CONFIG_PROVE_LOCKING.
> >  CONFIG_RCU_BOOST -- one of PREEMPT_RCU.
> >  CONFIG_RCU_KTHREAD_PRIO -- set to 2 for _BOOST testing.
> > -CONFIG_RCU_CPU_STALL_INFO -- Do one.
> > -CONFIG_RCU_FANOUT -- Cover hierarchy as currently, but overlap with others.
> > -CONFIG_RCU_FANOUT_EXACT -- Do one.
> > +CONFIG_RCU_CPU_STALL_INFO -- Now default, avoid at least twice.
> > +CONFIG_RCU_FANOUT -- Cover hierarchy, but overlap with others.
> >  CONFIG_RCU_FANOUT_LEAF -- Do one non-default.
> >  CONFIG_RCU_FAST_NO_HZ -- Do one, but not with CONFIG_RCU_NOCB_CPU_ALL.
> >  CONFIG_RCU_NOCB_CPU -- Do three, see below.
> > @@ -27,28 +26,19 @@ CONFIG_RCU_NOCB_CPU_NONE -- Do one.
> >  CONFIG_RCU_NOCB_CPU_ZERO -- Do one.
> >  CONFIG_RCU_TRACE -- Do half.
> >  CONFIG_SMP -- Need one !SMP for PREEMPT_RCU.
> > +!RCU_EXPERT -- Do a few, but these have to be vanilla configurations.
> >  RCU-bh: Do one with PREEMPT and one with !PREEMPT.
> >  RCU-sched: Do one with PREEMPT but not BOOST.
> >  
> >  
> > -Hierarchy:
> > -
> > -TREE01.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=8, CONFIG_RCU_FANOUT_EXACT=n.
> > -TREE02.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=n,
> > -	CONFIG_RCU_FANOUT_LEAF=3.
> > -TREE03.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=4, CONFIG_RCU_FANOUT_EXACT=n,
> > -	CONFIG_RCU_FANOUT_LEAF=4.
> > -TREE04.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
> > -	CONFIG_RCU_FANOUT_LEAF=2.
> > -TREE05.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=n
> > -	CONFIG_RCU_FANOUT_LEAF=6.
> > -TREE06.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=y
> > -	CONFIG_RCU_FANOUT_LEAF=6.
> > -TREE07.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
> > -	CONFIG_RCU_FANOUT_LEAF=2.
> > -TREE08.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=y,
> > -	CONFIG_RCU_FANOUT_LEAF=2.
> > -TREE09.	CONFIG_NR_CPUS=1.
> > +Boot parameters:
> > +
> > +nohz_full - do at least one.
> > +maxcpu -- do at least one.
> > +rcupdate.rcu_self_test_bh -- Do at least one each, offloaded and not.
> > +rcupdate.rcu_self_test_sched -- Do at least one each, offloaded and not.
> > +rcupdate.rcu_self_test -- Do at least one each, offloaded and not.
> > +rcutree.rcu_fanout_exact -- Do at least one.
> >  
> >  
> >  Kconfig Parameters Ignored:
> > -- 
> > 1.8.1.5
> > 
> 


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt
  2015-05-13 17:28       ` Paul E. McKenney
@ 2015-05-13 22:13         ` josh
  0 siblings, 0 replies; 20+ messages in thread
From: josh @ 2015-05-13 22:13 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec,
	oleg, bobby.prani

On Wed, May 13, 2015 at 10:28:25AM -0700, Paul E. McKenney wrote:
> On Tue, May 12, 2015 at 06:06:43PM -0700, josh@joshtriplett.org wrote:
> > On Tue, May 12, 2015 at 03:58:11PM -0700, Paul E. McKenney wrote:
> > > From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > > 
> > > This commit updates TREE_RCU-kconfig.txt to reflect changes in RCU's
> > > Kconfig setup.  This commit also updates rcutorture's Kconfig fragments
> > > to account for Kconfig parameters that are now driven directly off of
> > > other Kconfig parameters.
> > > 
> > > Reported-by: Pranith Kumar <bobby.prani@gmail.com>
> > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > 
> > Can you please explain the #CHECK# prefix that this adds to several of
> > the configs?
> 
> I added the following paragraph to the commit log:
> 
> 	The #CHECK# prefix tells the rcutorture scripts to take no action
> 	to try to set the Kconfig parameter, but to check that it does
> 	in fact get set.  This is useful for verifying that Kconfig
> 	parameters that are supposed to be automatically set do in fact
> 	get set to the required values.
> 
> Does that help?

Yes, that helps, thanks.

With that added:
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

> 							Thanx, Paul
> 
> > >  .../selftests/rcutorture/configs/rcu/TASKS01       |  3 +-
> > >  .../selftests/rcutorture/configs/rcu/TINY02        |  2 +-
> > >  .../selftests/rcutorture/configs/rcu/TREE04        |  2 +-
> > >  .../selftests/rcutorture/configs/rcu/TREE05        |  2 +-
> > >  .../selftests/rcutorture/configs/rcu/TREE06        |  2 +-
> > >  .../selftests/rcutorture/configs/rcu/TREE07        |  2 +-
> > >  .../selftests/rcutorture/configs/rcu/TREE08        |  2 +-
> > >  .../selftests/rcutorture/doc/TREE_RCU-kconfig.txt  | 36 ++++++++--------------
> > >  8 files changed, 21 insertions(+), 30 deletions(-)
> > > 
> > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01 b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> > > index 9318de8d5e88..2cc0e60eba6e 100644
> > > --- a/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TASKS01
> > > @@ -5,5 +5,6 @@ CONFIG_PREEMPT_NONE=n
> > >  CONFIG_PREEMPT_VOLUNTARY=n
> > >  CONFIG_PREEMPT=y
> > >  CONFIG_DEBUG_LOCK_ALLOC=y
> > > -CONFIG_PROVE_RCU=y
> > > +CONFIG_PROVE_LOCKING=n
> > > +#CHECK#CONFIG_PROVE_RCU=n
> > >  CONFIG_RCU_EXPERT=y
> > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TINY02 b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> > > index 36e41df3d27a..f1892e0371c9 100644
> > > --- a/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TINY02
> > > @@ -8,7 +8,7 @@ CONFIG_NO_HZ_IDLE=n
> > >  CONFIG_NO_HZ_FULL=n
> > >  CONFIG_RCU_TRACE=y
> > >  CONFIG_PROVE_LOCKING=y
> > > -CONFIG_PROVE_RCU=y
> > > +#CHECK#CONFIG_PROVE_RCU=y
> > >  CONFIG_DEBUG_LOCK_ALLOC=y
> > >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> > >  CONFIG_PREEMPT_COUNT=y
> > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> > > index d34e4b05941f..3f5112751cda 100644
> > > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04
> > > @@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=4
> > >  CONFIG_RCU_FANOUT_LEAF=4
> > >  CONFIG_RCU_NOCB_CPU=n
> > >  CONFIG_DEBUG_LOCK_ALLOC=n
> > > -CONFIG_RCU_CPU_STALL_INFO=y
> > > +CONFIG_RCU_CPU_STALL_INFO=n
> > >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> > >  CONFIG_RCU_EXPERT=y
> > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE05 b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> > > index 2f9b93a777dd..c04dfea6fd21 100644
> > > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE05
> > > @@ -16,7 +16,7 @@ CONFIG_RCU_NOCB_CPU=y
> > >  CONFIG_RCU_NOCB_CPU_NONE=y
> > >  CONFIG_DEBUG_LOCK_ALLOC=y
> > >  CONFIG_PROVE_LOCKING=y
> > > -CONFIG_PROVE_RCU=y
> > > +#CHECK#CONFIG_PROVE_RCU=y
> > >  CONFIG_RCU_CPU_STALL_INFO=n
> > >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> > >  CONFIG_RCU_EXPERT=y
> > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> > > index f7b2e87af79a..f51d2c73a68e 100644
> > > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06
> > > @@ -17,7 +17,7 @@ CONFIG_RCU_FANOUT_LEAF=6
> > >  CONFIG_RCU_NOCB_CPU=n
> > >  CONFIG_DEBUG_LOCK_ALLOC=y
> > >  CONFIG_PROVE_LOCKING=y
> > > -CONFIG_PROVE_RCU=y
> > > +#CHECK#CONFIG_PROVE_RCU=y
> > >  CONFIG_RCU_CPU_STALL_INFO=n
> > >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
> > >  CONFIG_RCU_EXPERT=y
> > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> > > index ce18d597b553..f422af4ff5a3 100644
> > > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE07
> > > @@ -17,6 +17,6 @@ CONFIG_RCU_FANOUT=2
> > >  CONFIG_RCU_FANOUT_LEAF=2
> > >  CONFIG_RCU_NOCB_CPU=n
> > >  CONFIG_DEBUG_LOCK_ALLOC=n
> > > -CONFIG_RCU_CPU_STALL_INFO=y
> > > +CONFIG_RCU_CPU_STALL_INFO=n
> > >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> > >  CONFIG_RCU_EXPERT=y
> > > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE08 b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> > > index fc1fed642917..a24d2ca30646 100644
> > > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> > > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE08
> > > @@ -18,7 +18,7 @@ CONFIG_RCU_NOCB_CPU=y
> > >  CONFIG_RCU_NOCB_CPU_ALL=y
> > >  CONFIG_DEBUG_LOCK_ALLOC=n
> > >  CONFIG_PROVE_LOCKING=y
> > > -CONFIG_PROVE_RCU=y
> > > +#CHECK#CONFIG_PROVE_RCU=y
> > >  CONFIG_RCU_CPU_STALL_INFO=n
> > >  CONFIG_RCU_BOOST=n
> > >  CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
> > > diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> > > index ec03c883db00..b24c0004fc49 100644
> > > --- a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> > > +++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
> > > @@ -12,13 +12,12 @@ CONFIG_NO_HZ_IDLE -- Do those not otherwise specified. (Groups of two.)
> > >  CONFIG_NO_HZ_FULL -- Do two, one with CONFIG_NO_HZ_FULL_SYSIDLE.
> > >  CONFIG_NO_HZ_FULL_SYSIDLE -- Do one.
> > >  CONFIG_PREEMPT -- Do half.  (First three and #8.)
> > > -CONFIG_PROVE_LOCKING -- Do all but two, covering CONFIG_PROVE_RCU and not.
> > > -CONFIG_PROVE_RCU -- Do all but one under CONFIG_PROVE_LOCKING.
> > > +CONFIG_PROVE_LOCKING -- Do several, covering CONFIG_DEBUG_LOCK_ALLOC=y and not.
> > > +CONFIG_PROVE_RCU -- Hardwired to CONFIG_PROVE_LOCKING.
> > >  CONFIG_RCU_BOOST -- one of PREEMPT_RCU.
> > >  CONFIG_RCU_KTHREAD_PRIO -- set to 2 for _BOOST testing.
> > > -CONFIG_RCU_CPU_STALL_INFO -- Do one.
> > > -CONFIG_RCU_FANOUT -- Cover hierarchy as currently, but overlap with others.
> > > -CONFIG_RCU_FANOUT_EXACT -- Do one.
> > > +CONFIG_RCU_CPU_STALL_INFO -- Now default, avoid at least twice.
> > > +CONFIG_RCU_FANOUT -- Cover hierarchy, but overlap with others.
> > >  CONFIG_RCU_FANOUT_LEAF -- Do one non-default.
> > >  CONFIG_RCU_FAST_NO_HZ -- Do one, but not with CONFIG_RCU_NOCB_CPU_ALL.
> > >  CONFIG_RCU_NOCB_CPU -- Do three, see below.
> > > @@ -27,28 +26,19 @@ CONFIG_RCU_NOCB_CPU_NONE -- Do one.
> > >  CONFIG_RCU_NOCB_CPU_ZERO -- Do one.
> > >  CONFIG_RCU_TRACE -- Do half.
> > >  CONFIG_SMP -- Need one !SMP for PREEMPT_RCU.
> > > +!RCU_EXPERT -- Do a few, but these have to be vanilla configurations.
> > >  RCU-bh: Do one with PREEMPT and one with !PREEMPT.
> > >  RCU-sched: Do one with PREEMPT but not BOOST.
> > >  
> > >  
> > > -Hierarchy:
> > > -
> > > -TREE01.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=8, CONFIG_RCU_FANOUT_EXACT=n.
> > > -TREE02.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=n,
> > > -	CONFIG_RCU_FANOUT_LEAF=3.
> > > -TREE03.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=4, CONFIG_RCU_FANOUT_EXACT=n,
> > > -	CONFIG_RCU_FANOUT_LEAF=4.
> > > -TREE04.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
> > > -	CONFIG_RCU_FANOUT_LEAF=2.
> > > -TREE05.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=n
> > > -	CONFIG_RCU_FANOUT_LEAF=6.
> > > -TREE06.	CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=y
> > > -	CONFIG_RCU_FANOUT_LEAF=6.
> > > -TREE07.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n,
> > > -	CONFIG_RCU_FANOUT_LEAF=2.
> > > -TREE08.	CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=y,
> > > -	CONFIG_RCU_FANOUT_LEAF=2.
> > > -TREE09.	CONFIG_NR_CPUS=1.
> > > +Boot parameters:
> > > +
> > > +nohz_full - do at least one.
> > > +maxcpu -- do at least one.
> > > +rcupdate.rcu_self_test_bh -- Do at least one each, offloaded and not.
> > > +rcupdate.rcu_self_test_sched -- Do at least one each, offloaded and not.
> > > +rcupdate.rcu_self_test -- Do at least one each, offloaded and not.
> > > +rcutree.rcu_fanout_exact -- Do at least one.
> > >  
> > >  
> > >  Kconfig Parameters Ignored:
> > > -- 
> > > 1.8.1.5
> > > 
> > 
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-05-13 22:13 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-12 22:57 [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 Paul E. McKenney
2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 02/13] rcutorture: Exchange TREE03 and TREE04 geometries Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 03/13] rcutorture: Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe Paul E. McKenney
2015-05-13  1:03     ` josh
2015-05-13 17:23       ` Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 05/13] locktorture: Change longdelay_us to longdelay_ms Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 06/13] rcutorture: Replace barriers with smp_store_release() and smp_load_acquire() Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 07/13] rcutorture: Test SRCU cleanup code path Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 08/13] rcutorture: TASKS_RCU set directly, so don't explicitly set it Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 09/13] rcutorture: Update configuration fragments for rcutree.rcu_fanout_exact Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 10/13] rcutorture: Make rcutorture scripts force RCU_EXPERT Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt Paul E. McKenney
2015-05-13  1:06     ` josh
2015-05-13 17:28       ` Paul E. McKenney
2015-05-13 22:13         ` josh
2015-05-12 22:58   ` [PATCH tip/core/rcu 12/13] rcutorture: Display "make oldconfig" errors Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 13/13] rcutorture: Allow repetition factors in Kconfig-fragment lists Paul E. McKenney
2015-05-13  1:07 ` [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 josh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).