From c9592ecb98d1e6d6ab2b54895314a46abfa69db4 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 9 Oct 2013 14:34:00 -0700 Subject: rcu: Fix typo in Documentation/RCU/trace.txt Signed-off-by: Paul E. McKenney --- Documentation/RCU/trace.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index f3778f8952da..7f5c57d78f3a 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt @@ -443,7 +443,7 @@ The output of "cat rcu/rcuboost" looks as follows: balk: nt=0 egt=6541 bt=0 nb=0 ny=126 nos=0 This information is output only for rcu_preempt. Each two-line entry -corresponds to a leaf rcu_node strcuture. The fields are as follows: +corresponds to a leaf rcu_node structure. The fields are as follows: o "n:m" is the CPU-number range for the corresponding two-line entry. In the sample output above, the first entry covers -- cgit v1.2.3 From 97e63f0caf0e977a1648b50943909c87a3f683d3 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 27 Oct 2013 09:44:03 -0700 Subject: rcu: Fix formatting blows in kernel-parameters.txt Signed-off-by: Paul E. McKenney --- Documentation/kernel-parameters.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 50680a59a2ff..9063e74ba5c6 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -2625,7 +2625,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. for RCU-preempt, and "s" for RCU-sched, and "N" is the CPU number. This reduces OS jitter on the offloaded CPUs, which can be useful for HPC and - real-time workloads. It can also improve energy efficiency for asymmetric multiprocessors. @@ -2641,8 +2640,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. periodically wake up to do the polling. rcutree.blimit= [KNL] - Set maximum number of finished RCU callbacks to process - in one batch. + Set maximum number of finished RCU callbacks to + process in one batch. rcutree.rcu_fanout_leaf= [KNL] Increase the number of CPUs assigned to each @@ -2661,8 +2660,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. value is one, and maximum value is HZ. rcutree.qhimark= [KNL] - Set threshold of queued - RCU callbacks over which batch limiting is disabled. + Set threshold of queued RCU callbacks beyond which + batch limiting is disabled. rcutree.qlowmark= [KNL] Set threshold of queued RCU callbacks below which -- cgit v1.2.3 From 9873552fc1b01ef9bddc9fec4c492d9fa8b27f51 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sat, 2 Nov 2013 10:17:52 -0700 Subject: documentation: Fix circular-buffer example. The code sample in Documentation/circular-buffers.txt appears to have a few ordering bugs. This patch therefore applies the needed fixes. Reported-by: Lech Fomicki Signed-off-by: Paul E. McKenney --- Documentation/circular-buffers.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Documentation/circular-buffers.txt b/Documentation/circular-buffers.txt index 8117e5bf6065..a36bed3db4ee 100644 --- a/Documentation/circular-buffers.txt +++ b/Documentation/circular-buffers.txt @@ -170,7 +170,7 @@ The producer will look something like this: smp_wmb(); /* commit the item before incrementing the head */ - buffer->head = (head + 1) & (buffer->size - 1); + ACCESS_ONCE(buffer->head) = (head + 1) & (buffer->size - 1); /* wake_up() will make sure that the head is committed before * waking anyone up */ @@ -183,9 +183,14 @@ This will instruct the CPU that the contents of the new item must be written before the head index makes it available to the consumer and then instructs the CPU that the revised head index must be written before the consumer is woken. -Note that wake_up() doesn't have to be the exact mechanism used, but whatever -is used must guarantee a (write) memory barrier between the update of the head -index and the change of state of the consumer, if a change of state occurs. +Note that wake_up() does not guarantee any sort of barrier unless something +is actually awakened. We therefore cannot rely on it for ordering. However, +there is always one element of the array left empty. Therefore, the +producer must produce two elements before it could possibly corrupt the +element currently being read by the consumer. Therefore, the unlock-lock +pair between consecutive invocations of the consumer provides the necessary +ordering between the read of the index indicating that the consumer has +vacated a given element and the write by the producer to that same element. THE CONSUMER @@ -200,7 +205,7 @@ The consumer will look something like this: if (CIRC_CNT(head, tail, buffer->size) >= 1) { /* read index before reading contents at that index */ - smp_read_barrier_depends(); + smp_rmb(); /* extract one item from the buffer */ struct item *item = buffer[tail]; @@ -209,7 +214,7 @@ The consumer will look something like this: smp_mb(); /* finish reading descriptor before incrementing tail */ - buffer->tail = (tail + 1) & (buffer->size - 1); + ACCESS_ONCE(buffer->tail) = (tail + 1) & (buffer->size - 1); } spin_unlock(&consumer_lock); @@ -223,7 +228,10 @@ Note the use of ACCESS_ONCE() in both algorithms to read the opposition index. This prevents the compiler from discarding and reloading its cached value - which some compilers will do across smp_read_barrier_depends(). This isn't strictly needed if you can be sure that the opposition index will _only_ be -used the once. +used the once. Similarly, ACCESS_ONCE() is used in both algorithms to +write the thread's index. This documents the fact that we are writing +to something that can be read concurrently and also prevents the compiler +from tearing the store. =============== -- cgit v1.2.3 From 6c43c091bdc56b8cab888cfa6b0ee9effb5fc255 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 4 Nov 2013 11:20:56 -0800 Subject: documentation: Update circular buffer for load-acquire/store-release This commit replaces full barriers by targeted use of load-acquire and store-release. Signed-off-by: Paul E. McKenney [ paulmck: Restore comments as suggested by David Howells. ] --- Documentation/circular-buffers.txt | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/Documentation/circular-buffers.txt b/Documentation/circular-buffers.txt index a36bed3db4ee..88951b179262 100644 --- a/Documentation/circular-buffers.txt +++ b/Documentation/circular-buffers.txt @@ -160,6 +160,7 @@ The producer will look something like this: spin_lock(&producer_lock); unsigned long head = buffer->head; + /* The spin_unlock() and next spin_lock() provide needed ordering. */ unsigned long tail = ACCESS_ONCE(buffer->tail); if (CIRC_SPACE(head, tail, buffer->size) >= 1) { @@ -168,9 +169,8 @@ The producer will look something like this: produce_item(item); - smp_wmb(); /* commit the item before incrementing the head */ - - ACCESS_ONCE(buffer->head) = (head + 1) & (buffer->size - 1); + smp_store_release(buffer->head, + (head + 1) & (buffer->size - 1)); /* wake_up() will make sure that the head is committed before * waking anyone up */ @@ -200,21 +200,20 @@ The consumer will look something like this: spin_lock(&consumer_lock); - unsigned long head = ACCESS_ONCE(buffer->head); + /* Read index before reading contents at that index. */ + unsigned long head = smp_load_acquire(buffer->head); unsigned long tail = buffer->tail; if (CIRC_CNT(head, tail, buffer->size) >= 1) { - /* read index before reading contents at that index */ - smp_rmb(); /* extract one item from the buffer */ struct item *item = buffer[tail]; consume_item(item); - smp_mb(); /* finish reading descriptor before incrementing tail */ - - ACCESS_ONCE(buffer->tail) = (tail + 1) & (buffer->size - 1); + /* Finish reading descriptor before incrementing tail. */ + smp_store_release(buffer->tail, + (tail + 1) & (buffer->size - 1)); } spin_unlock(&consumer_lock); @@ -223,15 +222,17 @@ This will instruct the CPU to make sure the index is up to date before reading the new item, and then it shall make sure the CPU has finished reading the item before it writes the new tail pointer, which will erase the item. - -Note the use of ACCESS_ONCE() in both algorithms to read the opposition index. -This prevents the compiler from discarding and reloading its cached value - -which some compilers will do across smp_read_barrier_depends(). This isn't -strictly needed if you can be sure that the opposition index will _only_ be -used the once. Similarly, ACCESS_ONCE() is used in both algorithms to -write the thread's index. This documents the fact that we are writing -to something that can be read concurrently and also prevents the compiler -from tearing the store. +Note the use of ACCESS_ONCE() and smp_load_acquire() to read the +opposition index. This prevents the compiler from discarding and +reloading its cached value - which some compilers will do across +smp_read_barrier_depends(). This isn't strictly needed if you can +be sure that the opposition index will _only_ be used the once. +The smp_load_acquire() additionally forces the CPU to order against +subsequent memory references. Similarly, smp_store_release() is used +in both algorithms to write the thread's index. This documents the +fact that we are writing to something that can be read concurrently, +prevents the compiler from tearing the store, and enforces ordering +against previous accesses. =============== -- cgit v1.2.3 From 6193c76aba8ec3cc5f083c35efbab9ed924125f6 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 23 Sep 2013 13:57:18 -0700 Subject: rcu: Kick CPU halfway to RCU CPU stall warning When an RCU CPU stall warning occurs, the CPU invokes resched_cpu() on itself. This can help move the grace period forward in some situations, but it would be even better to do this -before- the RCU CPU stall warning. This commit therefore causes resched_cpu() to be called every five jiffies once the system is halfway to an RCU CPU stall warning. Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 26 +++++++++++++++++++++++++- kernel/rcu/tree.h | 2 ++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index dd081987a8ec..5243ebea0fc1 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -754,6 +754,12 @@ static int dyntick_save_progress_counter(struct rcu_data *rdp, return (rdp->dynticks_snap & 0x1) == 0; } +/* + * This function really isn't for public consumption, but RCU is special in + * that context switches can allow the state machine to make progress. + */ +extern void resched_cpu(int cpu); + /* * Return true if the specified CPU has passed through a quiescent * state by virtue of being in or having passed through an dynticks @@ -812,16 +818,34 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, */ rcu_kick_nohz_cpu(rdp->cpu); + /* + * Alternatively, the CPU might be running in the kernel + * for an extended period of time without a quiescent state. + * Attempt to force the CPU through the scheduler to gain the + * needed quiescent state, but only if the grace period has gone + * on for an uncommonly long time. If there are many stuck CPUs, + * we will beat on the first one until it gets unstuck, then move + * to the next. Only do this for the primary flavor of RCU. + */ + if (rdp->rsp == rcu_state && + ULONG_CMP_GE(ACCESS_ONCE(jiffies), rdp->rsp->jiffies_resched)) { + rdp->rsp->jiffies_resched += 5; + resched_cpu(rdp->cpu); + } + return 0; } static void record_gp_stall_check_time(struct rcu_state *rsp) { unsigned long j = ACCESS_ONCE(jiffies); + unsigned long j1; rsp->gp_start = j; smp_wmb(); /* Record start time before stall time. */ - rsp->jiffies_stall = j + rcu_jiffies_till_stall_check(); + j1 = rcu_jiffies_till_stall_check(); + rsp->jiffies_stall = j + j1; + rsp->jiffies_resched = j + j1 / 2; } /* diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index 52be957c9fe2..8e34d8674a4e 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -453,6 +453,8 @@ struct rcu_state { /* but in jiffies. */ unsigned long jiffies_stall; /* Time at which to check */ /* for CPU stalls. */ + unsigned long jiffies_resched; /* Time at which to resched */ + /* a reluctant CPU. */ unsigned long gp_max; /* Maximum GP duration in */ /* jiffies. */ const char *name; /* Name of structure. */ -- cgit v1.2.3 From 78e4bc34e5d966cfd95f1238565afc399d56225c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 24 Sep 2013 15:04:06 -0700 Subject: rcu: Fix and comment ordering around wait_event() It is all too easy to forget that wait_event() does not necessarily imply a full memory barrier. The case where it does not is where the condition transitions to true just as wait_event() starts execution. This is actually a feature: The standard use of wait_event() involves locking, in which case the locks provide the needed ordering (you hold a lock across the wake_up() and acquire that same lock after wait_event() returns). Given that I did forget that wait_event() does not necessarily imply a full memory barrier in one case, this commit fixes that case. This commit also adds comments calling out the placement of existing memory barriers relied on by wait_event() calls. Signed-off-by: Paul E. McKenney --- kernel/rcu/torture.c | 8 +++++--- kernel/rcu/tree.c | 3 +++ kernel/rcu/tree_plugin.h | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/torture.c b/kernel/rcu/torture.c index 3929cd451511..69a4ec80a788 100644 --- a/kernel/rcu/torture.c +++ b/kernel/rcu/torture.c @@ -1578,6 +1578,7 @@ static int rcu_torture_barrier_cbs(void *arg) { long myid = (long)arg; bool lastphase = 0; + bool newphase; struct rcu_head rcu; init_rcu_head_on_stack(&rcu); @@ -1585,10 +1586,11 @@ static int rcu_torture_barrier_cbs(void *arg) set_user_nice(current, 19); do { wait_event(barrier_cbs_wq[myid], - barrier_phase != lastphase || + (newphase = + ACCESS_ONCE(barrier_phase)) != lastphase || kthread_should_stop() || fullstop != FULLSTOP_DONTSTOP); - lastphase = barrier_phase; + lastphase = newphase; smp_mb(); /* ensure barrier_phase load before ->call(). */ if (kthread_should_stop() || fullstop != FULLSTOP_DONTSTOP) break; @@ -1625,7 +1627,7 @@ static int rcu_torture_barrier(void *arg) if (kthread_should_stop() || fullstop != FULLSTOP_DONTSTOP) break; n_barrier_attempts++; - cur_ops->cb_barrier(); + cur_ops->cb_barrier(); /* Implies smp_mb() for wait_event(). */ if (atomic_read(&barrier_cbs_invoked) != n_barrier_cbs) { n_rcu_torture_barrier_error++; WARN_ON_ONCE(1); diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 5243ebea0fc1..abef9c358d47 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1533,6 +1533,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp) rdp = this_cpu_ptr(rsp->rda); if (rnp == rdp->mynode) __note_gp_changes(rsp, rnp, rdp); + /* smp_mb() provided by prior unlock-lock pair. */ nocb += rcu_future_gp_cleanup(rsp, rnp); raw_spin_unlock_irq(&rnp->lock); cond_resched(); @@ -1577,6 +1578,7 @@ static int __noreturn rcu_gp_kthread(void *arg) wait_event_interruptible(rsp->gp_wq, ACCESS_ONCE(rsp->gp_flags) & RCU_GP_FLAG_INIT); + /* Locking provides needed memory barrier. */ if (rcu_gp_init(rsp)) break; cond_resched(); @@ -1606,6 +1608,7 @@ static int __noreturn rcu_gp_kthread(void *arg) (!ACCESS_ONCE(rnp->qsmask) && !rcu_preempt_blocked_readers_cgp(rnp)), j); + /* Locking provides needed memory barriers. */ /* If grace period done, leave loop. */ if (!ACCESS_ONCE(rnp->qsmask) && !rcu_preempt_blocked_readers_cgp(rnp)) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 6abb03dff5c0..b023e5407111 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -779,8 +779,10 @@ static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp, } if (rnp->parent == NULL) { raw_spin_unlock_irqrestore(&rnp->lock, flags); - if (wake) + if (wake) { + smp_mb(); /* EGP done before wake_up(). */ wake_up(&sync_rcu_preempt_exp_wq); + } break; } mask = rnp->grpmask; @@ -1852,6 +1854,7 @@ static int rcu_oom_notify(struct notifier_block *self, /* Wait for callbacks from earlier instance to complete. */ wait_event(oom_callback_wq, atomic_read(&oom_callback_count) == 0); + smp_mb(); /* Ensure callback reuse happens after callback invocation. */ /* * Prevent premature wakeup: ensure that all increments happen @@ -2250,6 +2253,7 @@ static int rcu_nocb_kthread(void *arg) trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("Sleep")); wait_event_interruptible(rdp->nocb_wq, rdp->nocb_head); + /* Memory barrier provide by xchg() below. */ } else if (firsttime) { firsttime = 0; trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, -- cgit v1.2.3 From 96d3fd0d315a949e30adc80f086031c5cdf070d1 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 4 Oct 2013 14:33:34 -0700 Subject: rcu: Break call_rcu() deadlock involving scheduler and perf Dave Jones got the following lockdep splat: > ====================================================== > [ INFO: possible circular locking dependency detected ] > 3.12.0-rc3+ #92 Not tainted > ------------------------------------------------------- > trinity-child2/15191 is trying to acquire lock: > (&rdp->nocb_wq){......}, at: [] __wake_up+0x23/0x50 > > but task is already holding lock: > (&ctx->lock){-.-...}, at: [] perf_event_exit_task+0x109/0x230 > > which lock already depends on the new lock. > > > the existing dependency chain (in reverse order) is: > > -> #3 (&ctx->lock){-.-...}: > [] lock_acquire+0x93/0x200 > [] _raw_spin_lock+0x40/0x80 > [] __perf_event_task_sched_out+0x2df/0x5e0 > [] perf_event_task_sched_out+0x93/0xa0 > [] __schedule+0x1d2/0xa20 > [] preempt_schedule_irq+0x50/0xb0 > [] retint_kernel+0x26/0x30 > [] tty_flip_buffer_push+0x34/0x50 > [] pty_write+0x54/0x60 > [] n_tty_write+0x32d/0x4e0 > [] tty_write+0x158/0x2d0 > [] vfs_write+0xc0/0x1f0 > [] SyS_write+0x4c/0xa0 > [] tracesys+0xdd/0xe2 > > -> #2 (&rq->lock){-.-.-.}: > [] lock_acquire+0x93/0x200 > [] _raw_spin_lock+0x40/0x80 > [] wake_up_new_task+0xc2/0x2e0 > [] do_fork+0x126/0x460 > [] kernel_thread+0x26/0x30 > [] rest_init+0x23/0x140 > [] start_kernel+0x3f6/0x403 > [] x86_64_start_reservations+0x2a/0x2c > [] x86_64_start_kernel+0xf1/0xf4 > > -> #1 (&p->pi_lock){-.-.-.}: > [] lock_acquire+0x93/0x200 > [] _raw_spin_lock_irqsave+0x4b/0x90 > [] try_to_wake_up+0x31/0x350 > [] default_wake_function+0x12/0x20 > [] autoremove_wake_function+0x18/0x40 > [] __wake_up_common+0x58/0x90 > [] __wake_up+0x39/0x50 > [] __call_rcu_nocb_enqueue+0xa8/0xc0 > [] __call_rcu+0x140/0x820 > [] call_rcu+0x1d/0x20 > [] cpu_attach_domain+0x287/0x360 > [] build_sched_domains+0xe5e/0x10a0 > [] sched_init_smp+0x3b7/0x47a > [] kernel_init_freeable+0xf6/0x202 > [] kernel_init+0xe/0x190 > [] ret_from_fork+0x7c/0xb0 > > -> #0 (&rdp->nocb_wq){......}: > [] __lock_acquire+0x191a/0x1be0 > [] lock_acquire+0x93/0x200 > [] _raw_spin_lock_irqsave+0x4b/0x90 > [] __wake_up+0x23/0x50 > [] __call_rcu_nocb_enqueue+0xa8/0xc0 > [] __call_rcu+0x140/0x820 > [] kfree_call_rcu+0x20/0x30 > [] put_ctx+0x4f/0x70 > [] perf_event_exit_task+0x12e/0x230 > [] do_exit+0x30d/0xcc0 > [] do_group_exit+0x4c/0xc0 > [] SyS_exit_group+0x14/0x20 > [] tracesys+0xdd/0xe2 > > other info that might help us debug this: > > Chain exists of: > &rdp->nocb_wq --> &rq->lock --> &ctx->lock > > Possible unsafe locking scenario: > > CPU0 CPU1 > ---- ---- > lock(&ctx->lock); > lock(&rq->lock); > lock(&ctx->lock); > lock(&rdp->nocb_wq); > > *** DEADLOCK *** > > 1 lock held by trinity-child2/15191: > #0: (&ctx->lock){-.-...}, at: [] perf_event_exit_task+0x109/0x230 > > stack backtrace: > CPU: 2 PID: 15191 Comm: trinity-child2 Not tainted 3.12.0-rc3+ #92 > ffffffff82565b70 ffff880070c2dbf8 ffffffff8172a363 ffffffff824edf40 > ffff880070c2dc38 ffffffff81726741 ffff880070c2dc90 ffff88022383b1c0 > ffff88022383aac0 0000000000000000 ffff88022383b188 ffff88022383b1c0 > Call Trace: > [] dump_stack+0x4e/0x82 > [] print_circular_bug+0x200/0x20f > [] __lock_acquire+0x191a/0x1be0 > [] ? get_lock_stats+0x19/0x60 > [] ? native_sched_clock+0x24/0x80 > [] lock_acquire+0x93/0x200 > [] ? __wake_up+0x23/0x50 > [] _raw_spin_lock_irqsave+0x4b/0x90 > [] ? __wake_up+0x23/0x50 > [] __wake_up+0x23/0x50 > [] __call_rcu_nocb_enqueue+0xa8/0xc0 > [] __call_rcu+0x140/0x820 > [] ? local_clock+0x3f/0x50 > [] kfree_call_rcu+0x20/0x30 > [] put_ctx+0x4f/0x70 > [] perf_event_exit_task+0x12e/0x230 > [] do_exit+0x30d/0xcc0 > [] ? trace_hardirqs_on_caller+0x115/0x1e0 > [] ? trace_hardirqs_on+0xd/0x10 > [] do_group_exit+0x4c/0xc0 > [] SyS_exit_group+0x14/0x20 > [] tracesys+0xdd/0xe2 The underlying problem is that perf is invoking call_rcu() with the scheduler locks held, but in NOCB mode, call_rcu() will with high probability invoke the scheduler -- which just might want to use its locks. The reason that call_rcu() needs to invoke the scheduler is to wake up the corresponding rcuo callback-offload kthread, which does the job of starting up a grace period and invoking the callbacks afterwards. One solution (championed on a related problem by Lai Jiangshan) is to simply defer the wakeup to some point where scheduler locks are no longer held. Since we don't want to unnecessarily incur the cost of such deferral, the task before us is threefold: 1. Determine when it is likely that a relevant scheduler lock is held. 2. Defer the wakeup in such cases. 3. Ensure that all deferred wakeups eventually happen, preferably sooner rather than later. We use irqs_disabled_flags() as a proxy for relevant scheduler locks being held. This works because the relevant locks are always acquired with interrupts disabled. We may defer more often than needed, but that is at least safe. The wakeup deferral is tracked via a new field in the per-CPU and per-RCU-flavor rcu_data structure, namely ->nocb_defer_wakeup. This flag is checked by the RCU core processing. The __rcu_pending() function now checks this flag, which causes rcu_check_callbacks() to initiate RCU core processing at each scheduling-clock interrupt where this flag is set. Of course this is not sufficient because scheduling-clock interrupts are often turned off (the things we used to be able to count on!). So the flags are also checked on entry to any state that RCU considers to be idle, which includes both NO_HZ_IDLE idle state and NO_HZ_FULL user-mode-execution state. This approach should allow call_rcu() to be invoked regardless of what locks you might be holding, the key word being "should". Reported-by: Dave Jones Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra --- Documentation/RCU/trace.txt | 20 ++++++++++------- kernel/rcu/tree.c | 24 ++++++++++++++++---- kernel/rcu/tree.h | 9 ++++++-- kernel/rcu/tree_plugin.h | 55 ++++++++++++++++++++++++++++++++++++--------- kernel/rcu/tree_trace.c | 3 ++- 5 files changed, 86 insertions(+), 25 deletions(-) diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index f3778f8952da..b8c3c813ea57 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt @@ -396,14 +396,14 @@ o Each element of the form "3/3 ..>. 0:7 ^0" represents one rcu_node The output of "cat rcu/rcu_sched/rcu_pending" looks as follows: - 0!np=26111 qsp=29 rpq=5386 cbr=1 cng=570 gpc=3674 gps=577 nn=15903 - 1!np=28913 qsp=35 rpq=6097 cbr=1 cng=448 gpc=3700 gps=554 nn=18113 - 2!np=32740 qsp=37 rpq=6202 cbr=0 cng=476 gpc=4627 gps=546 nn=20889 - 3 np=23679 qsp=22 rpq=5044 cbr=1 cng=415 gpc=3403 gps=347 nn=14469 - 4!np=30714 qsp=4 rpq=5574 cbr=0 cng=528 gpc=3931 gps=639 nn=20042 - 5 np=28910 qsp=2 rpq=5246 cbr=0 cng=428 gpc=4105 gps=709 nn=18422 - 6!np=38648 qsp=5 rpq=7076 cbr=0 cng=840 gpc=4072 gps=961 nn=25699 - 7 np=37275 qsp=2 rpq=6873 cbr=0 cng=868 gpc=3416 gps=971 nn=25147 + 0!np=26111 qsp=29 rpq=5386 cbr=1 cng=570 gpc=3674 gps=577 nn=15903 ndw=0 + 1!np=28913 qsp=35 rpq=6097 cbr=1 cng=448 gpc=3700 gps=554 nn=18113 ndw=0 + 2!np=32740 qsp=37 rpq=6202 cbr=0 cng=476 gpc=4627 gps=546 nn=20889 ndw=0 + 3 np=23679 qsp=22 rpq=5044 cbr=1 cng=415 gpc=3403 gps=347 nn=14469 ndw=0 + 4!np=30714 qsp=4 rpq=5574 cbr=0 cng=528 gpc=3931 gps=639 nn=20042 ndw=0 + 5 np=28910 qsp=2 rpq=5246 cbr=0 cng=428 gpc=4105 gps=709 nn=18422 ndw=0 + 6!np=38648 qsp=5 rpq=7076 cbr=0 cng=840 gpc=4072 gps=961 nn=25699 ndw=0 + 7 np=37275 qsp=2 rpq=6873 cbr=0 cng=868 gpc=3416 gps=971 nn=25147 ndw=0 The fields are as follows: @@ -432,6 +432,10 @@ o "gpc" is the number of times that an old grace period had o "gps" is the number of times that a new grace period had started, but this CPU was not yet aware of it. +o "ndw" is the number of times that a wakeup of an rcuo + callback-offload kthread had to be deferred in order to avoid + deadlock. + o "nn" is the number of times that this CPU needed nothing. diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index abef9c358d47..264f0284c0bd 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -369,6 +369,9 @@ static struct rcu_node *rcu_get_root(struct rcu_state *rsp) static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval, bool user) { + struct rcu_state *rsp; + struct rcu_data *rdp; + trace_rcu_dyntick(TPS("Start"), oldval, rdtp->dynticks_nesting); if (!user && !is_idle_task(current)) { struct task_struct *idle __maybe_unused = @@ -380,6 +383,10 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval, current->pid, current->comm, idle->pid, idle->comm); /* must be idle task! */ } + for_each_rcu_flavor(rsp) { + rdp = this_cpu_ptr(rsp->rda); + do_nocb_deferred_wakeup(rdp); + } rcu_prepare_for_idle(smp_processor_id()); /* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */ smp_mb__before_atomic_inc(); /* See above. */ @@ -1928,13 +1935,13 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, * Adopt the RCU callbacks from the specified rcu_state structure's * orphanage. The caller must hold the ->orphan_lock. */ -static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) +static void rcu_adopt_orphan_cbs(struct rcu_state *rsp, unsigned long flags) { int i; struct rcu_data *rdp = __this_cpu_ptr(rsp->rda); /* No-CBs CPUs are handled specially. */ - if (rcu_nocb_adopt_orphan_cbs(rsp, rdp)) + if (rcu_nocb_adopt_orphan_cbs(rsp, rdp, flags)) return; /* Do the accounting first. */ @@ -2013,7 +2020,7 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp) /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */ rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp); - rcu_adopt_orphan_cbs(rsp); + rcu_adopt_orphan_cbs(rsp, flags); /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */ mask = rdp->grpmask; /* rnp->grplo is constant. */ @@ -2330,6 +2337,9 @@ __rcu_process_callbacks(struct rcu_state *rsp) /* If there are callbacks ready, invoke them. */ if (cpu_has_callbacks_ready_to_invoke(rdp)) invoke_rcu_callbacks(rsp, rdp); + + /* Do any needed deferred wakeups of rcuo kthreads. */ + do_nocb_deferred_wakeup(rdp); } /* @@ -2464,7 +2474,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), if (cpu != -1) rdp = per_cpu_ptr(rsp->rda, cpu); - offline = !__call_rcu_nocb(rdp, head, lazy); + offline = !__call_rcu_nocb(rdp, head, lazy, flags); WARN_ON_ONCE(offline); /* _call_rcu() is illegal on offline CPU; leak the callback. */ local_irq_restore(flags); @@ -2817,6 +2827,12 @@ static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp) return 1; } + /* Does this CPU need a deferred NOCB wakeup? */ + if (rcu_nocb_need_deferred_wakeup(rdp)) { + rdp->n_rp_nocb_defer_wakeup++; + return 1; + } + /* nothing to do */ rdp->n_rp_need_nothing++; return 0; diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index 8e34d8674a4e..a87adfc2916b 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -317,6 +317,7 @@ struct rcu_data { unsigned long n_rp_cpu_needs_gp; unsigned long n_rp_gp_completed; unsigned long n_rp_gp_started; + unsigned long n_rp_nocb_defer_wakeup; unsigned long n_rp_need_nothing; /* 6) _rcu_barrier() and OOM callbacks. */ @@ -335,6 +336,7 @@ struct rcu_data { int nocb_p_count_lazy; /* (approximate). */ wait_queue_head_t nocb_wq; /* For nocb kthreads to sleep on. */ struct task_struct *nocb_kthread; + bool nocb_defer_wakeup; /* Defer wakeup of nocb_kthread. */ #endif /* #ifdef CONFIG_RCU_NOCB_CPU */ /* 8) RCU CPU stall data. */ @@ -550,9 +552,12 @@ static void rcu_nocb_gp_set(struct rcu_node *rnp, int nrq); static void rcu_nocb_gp_cleanup(struct rcu_state *rsp, struct rcu_node *rnp); static void rcu_init_one_nocb(struct rcu_node *rnp); static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, - bool lazy); + bool lazy, unsigned long flags); static bool rcu_nocb_adopt_orphan_cbs(struct rcu_state *rsp, - struct rcu_data *rdp); + struct rcu_data *rdp, + unsigned long flags); +static bool rcu_nocb_need_deferred_wakeup(struct rcu_data *rdp); +static void do_nocb_deferred_wakeup(struct rcu_data *rdp); static void rcu_boot_init_nocb_percpu_data(struct rcu_data *rdp); static void rcu_spawn_nocb_kthreads(struct rcu_state *rsp); static void rcu_kick_nohz_cpu(int cpu); diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index b023e5407111..752ffaa0d681 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -2104,7 +2104,8 @@ bool rcu_is_nocb_cpu(int cpu) static void __call_rcu_nocb_enqueue(struct rcu_data *rdp, struct rcu_head *rhp, struct rcu_head **rhtp, - int rhcount, int rhcount_lazy) + int rhcount, int rhcount_lazy, + unsigned long flags) { int len; struct rcu_head **old_rhpp; @@ -2125,9 +2126,16 @@ static void __call_rcu_nocb_enqueue(struct rcu_data *rdp, } len = atomic_long_read(&rdp->nocb_q_count); if (old_rhpp == &rdp->nocb_head) { - wake_up(&rdp->nocb_wq); /* ... only if queue was empty ... */ + if (!irqs_disabled_flags(flags)) { + wake_up(&rdp->nocb_wq); /* ... if queue was empty ... */ + trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, + TPS("WakeEmpty")); + } else { + rdp->nocb_defer_wakeup = true; + trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, + TPS("WakeEmptyIsDeferred")); + } rdp->qlen_last_fqs_check = 0; - trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("WakeEmpty")); } else if (len > rdp->qlen_last_fqs_check + qhimark) { wake_up_process(t); /* ... or if many callbacks queued. */ rdp->qlen_last_fqs_check = LONG_MAX / 2; @@ -2148,12 +2156,12 @@ static void __call_rcu_nocb_enqueue(struct rcu_data *rdp, * "rcuo" kthread can find it. */ static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, - bool lazy) + bool lazy, unsigned long flags) { if (!rcu_is_nocb_cpu(rdp->cpu)) return 0; - __call_rcu_nocb_enqueue(rdp, rhp, &rhp->next, 1, lazy); + __call_rcu_nocb_enqueue(rdp, rhp, &rhp->next, 1, lazy, flags); if (__is_kfree_rcu_offset((unsigned long)rhp->func)) trace_rcu_kfree_callback(rdp->rsp->name, rhp, (unsigned long)rhp->func, @@ -2171,7 +2179,8 @@ static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, * not a no-CBs CPU. */ static bool __maybe_unused rcu_nocb_adopt_orphan_cbs(struct rcu_state *rsp, - struct rcu_data *rdp) + struct rcu_data *rdp, + unsigned long flags) { long ql = rsp->qlen; long qll = rsp->qlen_lazy; @@ -2185,14 +2194,14 @@ static bool __maybe_unused rcu_nocb_adopt_orphan_cbs(struct rcu_state *rsp, /* First, enqueue the donelist, if any. This preserves CB ordering. */ if (rsp->orphan_donelist != NULL) { __call_rcu_nocb_enqueue(rdp, rsp->orphan_donelist, - rsp->orphan_donetail, ql, qll); + rsp->orphan_donetail, ql, qll, flags); ql = qll = 0; rsp->orphan_donelist = NULL; rsp->orphan_donetail = &rsp->orphan_donelist; } if (rsp->orphan_nxtlist != NULL) { __call_rcu_nocb_enqueue(rdp, rsp->orphan_nxtlist, - rsp->orphan_nxttail, ql, qll); + rsp->orphan_nxttail, ql, qll, flags); ql = qll = 0; rsp->orphan_nxtlist = NULL; rsp->orphan_nxttail = &rsp->orphan_nxtlist; @@ -2314,6 +2323,22 @@ static int rcu_nocb_kthread(void *arg) return 0; } +/* Is a deferred wakeup of rcu_nocb_kthread() required? */ +static bool rcu_nocb_need_deferred_wakeup(struct rcu_data *rdp) +{ + return ACCESS_ONCE(rdp->nocb_defer_wakeup); +} + +/* Do a deferred wakeup of rcu_nocb_kthread(). */ +static void do_nocb_deferred_wakeup(struct rcu_data *rdp) +{ + if (!rcu_nocb_need_deferred_wakeup(rdp)) + return; + ACCESS_ONCE(rdp->nocb_defer_wakeup) = false; + wake_up(&rdp->nocb_wq); + trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("DeferredWakeEmpty")); +} + /* Initialize per-rcu_data variables for no-CBs CPUs. */ static void __init rcu_boot_init_nocb_percpu_data(struct rcu_data *rdp) { @@ -2369,13 +2394,14 @@ static void rcu_init_one_nocb(struct rcu_node *rnp) } static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, - bool lazy) + bool lazy, unsigned long flags) { return 0; } static bool __maybe_unused rcu_nocb_adopt_orphan_cbs(struct rcu_state *rsp, - struct rcu_data *rdp) + struct rcu_data *rdp, + unsigned long flags) { return 0; } @@ -2384,6 +2410,15 @@ static void __init rcu_boot_init_nocb_percpu_data(struct rcu_data *rdp) { } +static bool rcu_nocb_need_deferred_wakeup(struct rcu_data *rdp) +{ + return false; +} + +static void do_nocb_deferred_wakeup(struct rcu_data *rdp) +{ +} + static void __init rcu_spawn_nocb_kthreads(struct rcu_state *rsp) { } diff --git a/kernel/rcu/tree_trace.c b/kernel/rcu/tree_trace.c index 3596797b7e46..4def475336d4 100644 --- a/kernel/rcu/tree_trace.c +++ b/kernel/rcu/tree_trace.c @@ -364,9 +364,10 @@ static void print_one_rcu_pending(struct seq_file *m, struct rcu_data *rdp) rdp->n_rp_report_qs, rdp->n_rp_cb_ready, rdp->n_rp_cpu_needs_gp); - seq_printf(m, "gpc=%ld gps=%ld nn=%ld\n", + seq_printf(m, "gpc=%ld gps=%ld nn=%ld ndw%ld\n", rdp->n_rp_gp_completed, rdp->n_rp_gp_started, + rdp->n_rp_nocb_defer_wakeup, rdp->n_rp_need_nothing); } -- cgit v1.2.3 From 3a5924052aec266f1035f2ff610b60b7d10dbe7f Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 4 Oct 2013 18:48:55 -0700 Subject: rcu: Allow task-level idle entry/exit nesting The current task-level idle entry/exit code forces an entry/exit on each call, regardless of the nesting level. This commit therefore properly accounts for nesting. Signed-off-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker --- kernel/rcu/tree.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 264f0284c0bd..518e08428b2e 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -418,11 +418,12 @@ static void rcu_eqs_enter(bool user) rdtp = this_cpu_ptr(&rcu_dynticks); oldval = rdtp->dynticks_nesting; WARN_ON_ONCE((oldval & DYNTICK_TASK_NEST_MASK) == 0); - if ((oldval & DYNTICK_TASK_NEST_MASK) == DYNTICK_TASK_NEST_VALUE) + if ((oldval & DYNTICK_TASK_NEST_MASK) == DYNTICK_TASK_NEST_VALUE) { rdtp->dynticks_nesting = 0; - else + rcu_eqs_enter_common(rdtp, oldval, user); + } else { rdtp->dynticks_nesting -= DYNTICK_TASK_NEST_VALUE; - rcu_eqs_enter_common(rdtp, oldval, user); + } } /** @@ -540,11 +541,12 @@ static void rcu_eqs_exit(bool user) rdtp = this_cpu_ptr(&rcu_dynticks); oldval = rdtp->dynticks_nesting; WARN_ON_ONCE(oldval < 0); - if (oldval & DYNTICK_TASK_NEST_MASK) + if (oldval & DYNTICK_TASK_NEST_MASK) { rdtp->dynticks_nesting += DYNTICK_TASK_NEST_VALUE; - else + } else { rdtp->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE; - rcu_eqs_exit_common(rdtp, oldval, user); + rcu_eqs_exit_common(rdtp, oldval, user); + } } /** -- cgit v1.2.3 From 4461212aa0c604c5214856f0ae10a2b335f7e73a Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 9 Oct 2013 08:09:29 -0700 Subject: rcu: Fix srcu_barrier() docbook header The srcu_barrier() docbook header left out the "sp" argument, so this commit adds that argument's docbook text. Signed-off-by: Paul E. McKenney --- kernel/rcu/srcu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index 01d5ccb8bfe3..0f0c63111f20 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c @@ -491,6 +491,7 @@ EXPORT_SYMBOL_GPL(synchronize_srcu_expedited); /** * srcu_barrier - Wait until all in-flight call_srcu() callbacks complete. + * @sp: srcu_struct on which to wait for in-flight callbacks. */ void srcu_barrier(struct srcu_struct *sp) { -- cgit v1.2.3 From 3947909814f38d524829bc41bd4c11068a15f0cd Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 9 Oct 2013 15:20:33 -0700 Subject: rcu: Let the world know when RCU adjusts its geometry Some RCU bugs have been specific to the layout of the rcu_node tree, but RCU will silently adjust the tree at boot time if appropriate. This obscures valuable debugging information, so print a message when this happens. Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 518e08428b2e..30499508c72e 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -3391,6 +3391,8 @@ static void __init rcu_init_geometry(void) if (rcu_fanout_leaf == CONFIG_RCU_FANOUT_LEAF && nr_cpu_ids == NR_CPUS) return; + pr_info("RCU: Adjusting geometry for rcu_fanout_leaf=%d, nr_cpu_ids=%d\n", + rcu_fanout_leaf, nr_cpu_ids); /* * Compute number of nodes that can be handled an rcu_node tree -- cgit v1.2.3 From c87b9c601ac862b1fa41a9d759a3c05711a8391d Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sat, 28 Sep 2013 14:12:21 -0700 Subject: rcutorture: Add KVM-based test framework This commit adds the test framework that I used to test RCU under KVM. This consists of a group of scripts and Kconfig fragments. Signed-off-by: Paul E. McKenney Cc: Greg KH --- MAINTAINERS | 6 + tools/testing/selftests/rcutorture/.gitignore | 6 + .../selftests/rcutorture/bin/config2frag.sh | 25 +++ .../selftests/rcutorture/bin/configNR_CPUS.sh | 45 +++++ .../selftests/rcutorture/bin/configcheck.sh | 54 ++++++ .../testing/selftests/rcutorture/bin/configinit.sh | 83 +++++++++ tools/testing/selftests/rcutorture/bin/cpus2use.sh | 41 +++++ .../testing/selftests/rcutorture/bin/functions.sh | 42 +++++ .../testing/selftests/rcutorture/bin/kvm-build.sh | 71 ++++++++ .../selftests/rcutorture/bin/kvm-recheck.sh | 46 +++++ .../selftests/rcutorture/bin/kvm-test-1-rcu.sh | 189 +++++++++++++++++++++ tools/testing/selftests/rcutorture/bin/kvm.sh | 173 +++++++++++++++++++ .../selftests/rcutorture/bin/parse-build.sh | 47 +++++ .../selftests/rcutorture/bin/parse-console.sh | 39 +++++ .../selftests/rcutorture/bin/parse-rcutorture.sh | 104 ++++++++++++ .../rcutorture/configs/N1-S-T-NH-SD-SMP-HP | 19 +++ .../rcutorture/configs/N2-2-t-nh-sd-SMP-hp | 20 +++ .../rcutorture/configs/N3-3-T-nh-SD-SMP-hp | 22 +++ .../rcutorture/configs/N4-A-t-NH-sd-SMP-HP | 18 ++ .../rcutorture/configs/N5-U-T-NH-sd-SMP-hp | 22 +++ .../rcutorture/configs/N6---t-nh-SD-smp-hp | 19 +++ .../rcutorture/configs/N7-4-T-NH-SD-SMP-HP | 26 +++ .../rcutorture/configs/N8-2-T-NH-SD-SMP-HP | 22 +++ tools/testing/selftests/rcutorture/configs/NT1-nh | 23 +++ tools/testing/selftests/rcutorture/configs/NT3-NH | 20 +++ .../rcutorture/configs/P1-S-T-NH-SD-SMP-HP | 20 +++ .../rcutorture/configs/P2-2-t-nh-sd-SMP-hp | 20 +++ .../rcutorture/configs/P3-3-T-nh-SD-SMP-hp | 20 +++ .../rcutorture/configs/P4-A-t-NH-sd-SMP-HP | 22 +++ .../rcutorture/configs/P5-U-T-NH-sd-SMP-hp | 28 +++ .../rcutorture/configs/P6---t-nh-SD-smp-hp | 18 ++ .../rcutorture/configs/P7-4-T-NH-SD-SMP-HP | 30 ++++ .../rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all | 30 ++++ .../rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none | 30 ++++ .../rcutorture/configs/P7-4-T-NH-SD-SMP-hp | 30 ++++ tools/testing/selftests/rcutorture/configs/PT1-nh | 23 +++ tools/testing/selftests/rcutorture/configs/PT2-NH | 22 +++ .../rcutorture/configs/sysidleN.2013.06.19a | 23 +++ .../rcutorture/configs/sysidleY.2013.06.19a | 26 +++ tools/testing/selftests/rcutorture/doc/initrd.txt | 90 ++++++++++ .../selftests/rcutorture/doc/rcu-test-image.txt | 42 +++++ 41 files changed, 1656 insertions(+) create mode 100644 tools/testing/selftests/rcutorture/.gitignore create mode 100644 tools/testing/selftests/rcutorture/bin/config2frag.sh create mode 100755 tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh create mode 100755 tools/testing/selftests/rcutorture/bin/configcheck.sh create mode 100755 tools/testing/selftests/rcutorture/bin/configinit.sh create mode 100755 tools/testing/selftests/rcutorture/bin/cpus2use.sh create mode 100644 tools/testing/selftests/rcutorture/bin/functions.sh create mode 100755 tools/testing/selftests/rcutorture/bin/kvm-build.sh create mode 100755 tools/testing/selftests/rcutorture/bin/kvm-recheck.sh create mode 100755 tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh create mode 100644 tools/testing/selftests/rcutorture/bin/kvm.sh create mode 100755 tools/testing/selftests/rcutorture/bin/parse-build.sh create mode 100755 tools/testing/selftests/rcutorture/bin/parse-console.sh create mode 100755 tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh create mode 100644 tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp create mode 100644 tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/NT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/NT3-NH create mode 100644 tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp create mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all create mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none create mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/PT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/PT2-NH create mode 100644 tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a create mode 100644 tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a create mode 100644 tools/testing/selftests/rcutorture/doc/initrd.txt create mode 100644 tools/testing/selftests/rcutorture/doc/rcu-test-image.txt diff --git a/MAINTAINERS b/MAINTAINERS index f216db847022..a0a7c4afba4b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7033,6 +7033,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git F: Documentation/RCU/torture.txt F: kernel/rcu/torture.c +RCUTORTURE TEST FRAMEWORK +M: "Paul E. McKenney" +S: Supported +T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git +F: tools/testing/selftests/rcutorture + RDC R-321X SoC M: Florian Fainelli S: Maintained diff --git a/tools/testing/selftests/rcutorture/.gitignore b/tools/testing/selftests/rcutorture/.gitignore new file mode 100644 index 000000000000..05838f6f2ebe --- /dev/null +++ b/tools/testing/selftests/rcutorture/.gitignore @@ -0,0 +1,6 @@ +initrd +linux-2.6 +b[0-9]* +rcu-test-image +res +*.swp diff --git a/tools/testing/selftests/rcutorture/bin/config2frag.sh b/tools/testing/selftests/rcutorture/bin/config2frag.sh new file mode 100644 index 000000000000..252f769c17ba --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/config2frag.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Usage: sh config2frag.sh < .config > configfrag +# +# Converts the "# CONFIG_XXX is not set" to "CONFIG_XXX=n" so that the +# resulting file becomes a legitimate Kconfig fragment. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +LANG=C sed -e 's/^# CONFIG_\([a-zA-Z0-9_]*\) is not set$/CONFIG_\1=n/' diff --git a/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh b/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh new file mode 100755 index 000000000000..9e8b11206dcc --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# +# Extract the number of CPUs expected from the specified Kconfig-file +# fragment by checking CONFIG_SMP and CONFIG_NR_CPUS. If the specified +# file gives no clue, base the number on the number of idle CPUs on +# the system. +# +# Usage: configNR_CPUS.sh config-frag +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +cf=$1 +if test ! -r $cf +then + echo Unreadable config fragment $cf 1>&2 + exit -1 +fi +if grep -q '^CONFIG_SMP=n$' $cf +then + echo 1 + exit 0 +fi +if grep -q '^CONFIG_NR_CPUS=' $cf +then + grep '^CONFIG_NR_CPUS=' $cf | + sed -e 's/^CONFIG_NR_CPUS=\([0-9]*\).*$/\1/' + exit 0 +fi +cpus2use.sh diff --git a/tools/testing/selftests/rcutorture/bin/configcheck.sh b/tools/testing/selftests/rcutorture/bin/configcheck.sh new file mode 100755 index 000000000000..a3e5b9272b46 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/configcheck.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# Usage: sh configcheck.sh .config .config-template +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +T=/tmp/abat-chk-config.sh.$$ +trap 'rm -rf $T' 0 +mkdir $T + +cat $1 > $T/.config + +cat $2 | sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' | +awk ' +BEGIN { + print "if grep -q \"" $0 "\" < '"$T/.config"'"; + print "then"; + print "\t:"; + print "else"; + if ($1 == "#") { + print "\tif grep -q \"" $2 "\" < '"$T/.config"'"; + print "\tthen"; + print "\t\tif test \"$firsttime\" = \"\"" + print "\t\tthen" + print "\t\t\tfirsttime=1" + print "\t\tfi" + print "\t\techo \":" $2 ": improperly set\""; + print "\telse"; + print "\t\t:"; + print "\tfi"; + } else { + print "\tif test \"$firsttime\" = \"\"" + print "\tthen" + print "\t\tfirsttime=1" + print "\tfi" + print "\techo \":" $0 ": improperly set\""; + } + print "fi"; + }' | sh diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh new file mode 100755 index 000000000000..1f09d599e9d9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/configinit.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# +# sh configinit.sh config-spec-file [ build output dir ] +# +# Create a .config file from the spec file. Run from the kernel source tree. +# Exits with 0 if all went well, with 1 if all went well but the config +# did not match, and some other number for other failures. +# +# The first argument is the .config specification file, which contains +# desired settings, for example, "CONFIG_NO_HZ=y". For best results, +# this should be a full pathname. +# +# The second argument is a optional path to a build output directory, +# for example, "O=/tmp/foo". If this argument is omitted, the .config +# file will be generated directly in the current directory. + +echo configinit.sh $* + +T=/tmp/configinit.sh.$$ +trap 'rm -rf $T' 0 +mkdir $T + +# Capture config spec file. + +c=$1 +buildloc=$2 +builddir= +if test -n $buildloc +then + if echo $buildloc | grep -q '^O=' + then + builddir=`echo $buildloc | sed -e 's/^O=//'` + if test ! -d $builddir + then + mkdir $builddir + fi + else + echo Bad build directory: \"$builddir\" + exit 2 + fi +fi + +sed -e 's/^\(CONFIG[0-9A-Z_]*\)=.*$/grep -v "^# \1" |/' < $c > $T/u.sh +sed -e 's/^\(CONFIG[0-9A-Z_]*=\).*$/grep -v \1 |/' < $c >> $T/u.sh +grep '^grep' < $T/u.sh > $T/upd.sh +echo "cat - $c" >> $T/upd.sh +make mrproper +make $buildloc distclean > $builddir/Make.distclean 2>&1 +make $buildloc 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 + +# verify new config matches specification. + +sed -e 's/"//g' < $c > $T/c +sed -e 's/"//g' < $builddir/.config > $T/.config +sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' < $c | +awk ' + { + print "if grep -q \"" $0 "\" < '"$T/.config"'"; + print "then"; + print "\t:"; + print "else"; + if ($1 == "#") { + print "\tif grep -q \"" $2 "\" < '"$T/.config"'"; + print "\tthen"; + print "\t\techo \":" $2 ": improperly set\""; + print "\telse"; + print "\t\t:"; + print "\tfi"; + } else { + print "\techo \":" $0 ": improperly set\""; + } + print "fi"; + }' | sh > $T/diagnostics +if test -s $T/diagnostics +then + cat $T/diagnostics + exit 1 +fi +exit 0 diff --git a/tools/testing/selftests/rcutorture/bin/cpus2use.sh b/tools/testing/selftests/rcutorture/bin/cpus2use.sh new file mode 100755 index 000000000000..277a3f6c8210 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/cpus2use.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Get an estimate of how CPU-hoggy to be. +# +# Usage: cpus2use.sh +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +ncpus=`grep '^processor' /proc/cpuinfo | wc -l` +idlecpus=`mpstat | tail -1 | \ + awk -v ncpus=$ncpus '{ print ncpus * ($7 + $12) / 100 }'` +awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null ' +BEGIN { + cpus2use = idlecpus; + if (cpus2use < 1) + cpus2use = 1; + if (cpus2use < ncpus / 10) + cpus2use = ncpus / 10; + if (cpus2use == int(cpus2use)) + cpus2use = int(cpus2use) + else + cpus2use = int(cpus2use) + 1 + print cpus2use; +}' + diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh new file mode 100644 index 000000000000..db1c32acdcf6 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# Shell functions for the rest of the scripts. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +# bootparam_hotplug_cpu bootparam-string +# +# Returns 1 if the specified boot-parameter string tells rcutorture to +# test CPU-hotplug operations. +bootparam_hotplug_cpu () { + echo "$1" | grep -q "rcutorture\.onoff_" +} + +# configfrag_hotplug_cpu config-fragment-file +# +# Returns 1 if the config fragment specifies hotplug CPU. +configfrag_hotplug_cpu () { + cf=$1 + if test ! -r $cf + then + echo Unreadable config fragment $cf 1>&2 + exit -1 + fi + grep -q '^CONFIG_HOTPLUG_CPU=y$' $cf +} diff --git a/tools/testing/selftests/rcutorture/bin/kvm-build.sh b/tools/testing/selftests/rcutorture/bin/kvm-build.sh new file mode 100755 index 000000000000..07bbeccb5a28 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-build.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# +# Build a kvm-ready Linux kernel from the tree in the current directory. +# +# Usage: sh kvm-build.sh config-template build-dir more-configs +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +config_template=${1} +if test -z "$config_template" -o ! -f "$config_template" -o ! -r "$config_template" +then + echo "kvm-build.sh :$config_template: Not a readable file" + exit 1 +fi +builddir=${2} +if test -z "$builddir" -o ! -d "$builddir" -o ! -w "$builddir" +then + echo "kvm-build.sh :$builddir: Not a writable directory, cannot build into it" + exit 1 +fi +moreconfigs=${3} +if test -z "$moreconfigs" -o ! -r "$moreconfigs" +then + echo "kvm-build.sh :$moreconfigs: Not a readable file" + exit 1 +fi + +T=/tmp/test-linux.sh.$$ +trap 'rm -rf $T' 0 +mkdir $T + +cat ${config_template} | grep -v CONFIG_RCU_TORTURE_TEST > $T/config +cat << ___EOF___ >> $T/config +CONFIG_INITRAMFS_SOURCE="$KVM/initrd" +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_CONSOLE=y +___EOF___ +cat $moreconfigs >> $T/config + +configinit.sh $T/config O=$builddir +retval=$? +if test $retval -gt 1 +then + exit 2 +fi +ncpus=`cpus2use.sh` +make O=$builddir -j$ncpus > $builddir/Make.out 2>&1 +retval=$? +if test $retval -ne 0 || grep "rcu[^/]*": < $builddir/Make.out | egrep -q "Stop|Error|error:|warning:" || egrep -q "Stop|Error|error:" < $builddir/Make.out +then + echo Kernel build error + egrep "Stop|Error|error:|warning:" < $builddir/Make.out + echo Run aborted. + exit 3 +fi diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh new file mode 100755 index 000000000000..0876af75b66b --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Given the results directories for previous KVM runs of rcutorture, +# check the build and console output for errors. Given a directory +# containing results directories, this recursively checks them all. +# +# Usage: sh kvm-recheck.sh configdir resdir ... +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH +configdir=${1} +shift +for rd in "$@" +do + dirs=`find $rd -name Make.defconfig.out -print | sort | sed -e 's,/[^/]*$,,' | sort -u` + for i in $dirs + do + configfile=`echo $i | sed -e 's/^.*\///'` + echo $i + configcheck.sh $i/.config $configdir/$configfile + parse-build.sh $i/Make.out $configfile + parse-rcutorture.sh $i/console.log $configfile + parse-console.sh $i/console.log $configfile + if test -r $i/Warnings + then + cat $i/Warnings + fi + done +done diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh new file mode 100755 index 000000000000..ae5c2ff4c0ce --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -0,0 +1,189 @@ +#!/bin/bash +# +# Run a kvm-based test of the specified tree on the specified configs. +# Fully automated run and error checking, no graphics console. +# +# Execute this in the source tree. Do not run it as a background task +# because qemu does not seem to like that much. +# +# Usage: sh kvm-test-1-rcu.sh config builddir resdir minutes qemu-args bootargs +# +# qemu-args defaults to "" -- you will want "-nographic" if running headless. +# bootargs defaults to "root=/dev/sda noapic selinux=0 console=ttyS0" +# "initcall_debug debug rcutorture.stat_interval=15" +# "rcutorture.shutdown_secs=$((minutes * 60))" +# "rcutorture.rcutorture_runnable=1" +# +# Anything you specify for either qemu-args or bootargs is appended to +# the default values. The "-smp" value is deduced from the contents of +# the config fragment. +# +# More sophisticated argument parsing is clearly needed. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +grace=120 + +T=/tmp/kvm-test-1-rcu.sh.$$ +trap 'rm -rf $T' 0 + +. $KVM/bin/functions.sh + +config_template=${1} +title=`echo $config_template | sed -e 's/^.*\///'` +builddir=${2} +if test -z "$builddir" -o ! -d "$builddir" -o ! -w "$builddir" +then + echo "kvm-test-1-rcu.sh :$builddir: Not a writable directory, cannot build into it" + exit 1 +fi +resdir=${3} +if test -z "$resdir" -o ! -d "$resdir" -o ! -w "$resdir" +then + echo "kvm-test-1-rcu.sh :$resdir: Not a writable directory, cannot build into it" + exit 1 +fi +cp $config_template $resdir/ConfigFragment +echo ' ---' `date`: Starting build +cat << '___EOF___' >> $T +CONFIG_RCU_TORTURE_TEST=y +___EOF___ +# Optimizations below this point +# CONFIG_USB=n +# CONFIG_SECURITY=n +# CONFIG_NFS_FS=n +# CONFIG_SOUND=n +# CONFIG_INPUT_JOYSTICK=n +# CONFIG_INPUT_TABLET=n +# CONFIG_INPUT_TOUCHSCREEN=n +# CONFIG_INPUT_MISC=n +# CONFIG_INPUT_MOUSE=n +# # CONFIG_NET=n # disables console access, so accept the slower build. +# CONFIG_SCSI=n +# CONFIG_ATA=n +# CONFIG_FAT_FS=n +# CONFIG_MSDOS_FS=n +# CONFIG_VFAT_FS=n +# CONFIG_ISO9660_FS=n +# CONFIG_QUOTA=n +# CONFIG_HID=n +# CONFIG_CRYPTO=n +# CONFIG_PCCARD=n +# CONFIG_PCMCIA=n +# CONFIG_CARDBUS=n +# CONFIG_YENTA=n +if kvm-build.sh $config_template $builddir $T +then + cp $builddir/Make*.out $resdir + cp $builddir/.config $resdir + cp $builddir/arch/x86/boot/bzImage $resdir + parse-build.sh $resdir/Make.out $title +else + cp $builddir/Make*.out $resdir + echo Build failed, not running KVM, see $resdir. + exit 1 +fi +minutes=$4 +seconds=$(($minutes * 60)) +qemu_args=$5 +boot_args=$6 + +cd $KVM +kstarttime=`awk 'BEGIN { print systime() }' < /dev/null` +echo ' ---' `date`: Starting kernel +if file linux-2.6/*.o | grep -q 64-bit +then + QEMU=qemu-system-x86_64 +else + QEMU=qemu-system-i386 +fi + +# Generate -smp qemu argument. +cpu_count=`configNR_CPUS.sh $config_template` +ncpus=`grep '^processor' /proc/cpuinfo | wc -l` +if test $cpu_count -gt $ncpus +then + echo CPU count limited from $cpu_count to $ncpus + touch $resdir/Warnings + echo CPU count limited from $cpu_count to $ncpus >> $resdir/Warnings + cpu_count=$ncpus +fi +if echo $qemu_args | grep -q -e -smp +then + echo CPU count specified by caller +else + qemu_args="$qemu_args -smp $cpu_count" +fi + +# Generate CPU-hotplug boot parameters +if ! bootparam_hotplug_cpu "$bootargs" +then + if configfrag_hotplug_cpu $builddir/.config + then + echo Kernel configured for CPU hotplug, adding rcutorture. + bootargs="$bootargs rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30" + fi +fi + +echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd +$QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & +qemu_pid=$! +commandcompleted=0 +echo Monitoring qemu job at pid $qemu_pid +for ((i=0;i<$seconds;i++)) +do + if kill -0 $qemu_pid > /dev/null 2>&1 + then + sleep 1 + else + commandcompleted=1 + kruntime=`awk 'BEGIN { print systime() - '"$kstarttime"' }' < /dev/null` + if test $kruntime -lt $seconds + then + echo Completed in $kruntime vs. $seconds >> $resdir/Warnings 2>&1 + else + echo ' ---' `date`: Kernel done + fi + break + fi +done +if test $commandcompleted -eq 0 +then + echo Grace period for qemu job at pid $qemu_pid + for ((i=0;i<=$grace;i++)) + do + if kill -0 $qemu_pid > /dev/null 2>&1 + then + sleep 1 + else + break + fi + if test $i -eq $grace + then + kruntime=`awk 'BEGIN { print systime() - '"$kstarttime"' }'` + echo "!!! Hang at $kruntime vs. $seconds seconds" >> $resdir/Warnings 2>&1 + kill -KILL $qemu_pid + fi + done +fi + +cp $builddir/console.log $resdir +parse-rcutorture.sh $resdir/console.log $title >> $resdir/Warnings 2>&1 +parse-console.sh $resdir/console.log $title >> $resdir/Warnings 2>&1 +cat $resdir/Warnings diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh new file mode 100644 index 000000000000..46c75ee2f528 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -0,0 +1,173 @@ +#!/bin/bash +# +# Run a series of 14 tests under KVM. These are not particularly +# well-selected or well-tuned, but are the current set. Run from the +# top level of the source tree. +# +# Edit the definitions below to set the locations of the various directories, +# as well as the test duration. +# +# Usage: sh kvm.sh [ options ] +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +scriptname=$0 + +dur=30 +KVM=`pwd`/tools/testing/selftests/rcutorture; export KVM +builddir=${KVM}/b1 +resdir="" +configs=" sysidleY.2013.06.19a \ + sysidleN.2013.06.19a \ + P1-S-T-NH-SD-SMP-HP \ + P2-2-t-nh-sd-SMP-hp \ + P3-3-T-nh-SD-SMP-hp \ + P4-A-t-NH-sd-SMP-HP \ + P5-U-T-NH-sd-SMP-hp \ + P6---t-nh-SD-smp-hp \ + N1-S-T-NH-SD-SMP-HP \ + N2-2-t-nh-sd-SMP-hp \ + N3-3-T-nh-SD-SMP-hp \ + N4-A-t-NH-sd-SMP-HP \ + N5-U-T-NH-sd-SMP-hp \ + PT1-nh \ + PT2-NH \ + NT1-nh \ + NT3-NH" + +usage () { + echo "Usage: $scriptname optional arguments:" + echo " --builddir absolute-pathname" + echo " --configs \"config-file list\"" + echo " --duration minutes" + echo " --rcu-kvm absolute-pathname" + echo " --results absolute-pathname" + echo " --relbuilddir relative-pathname" + exit 1 +} + +# checkarg --argname argtype $# arg mustmatch cannotmatch +checkarg () { + if test $3 -le 1 + then + echo $1 needs argument $2 matching \"$5\" + usage + fi + if echo "$4" | grep -q -e "$5" + then + : + else + echo $1 $2 \"$4\" must match \"$5\" + usage + fi + if echo "$4" | grep -q -e "$6" + then + echo $1 $2 \"$4\" must not match \"$6\" + usage + fi +} + +while test $# -gt 0 +do + echo ":$1:" + case "$1" in + --builddir) + checkarg --builddir "(absolute pathname)" "$#" "$2" '^/' error + builddir=$2 + gotbuilddir=1 + shift + ;; + --configs) + checkarg --configs "(list of config files)" "$#" "$2" '^[^/]*$' '^--' + configs="$2" + shift + ;; + --duration) + checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' error + dur=$2 + shift + ;; + --rcu-kvm) + checkarg --rcu-kvm "(absolute pathname)" "$#" "$2" '^/' error + KVM=$2; export KVM + if -z "$gotbuilddir" + then + builddir=${KVM}/b1 + fi + if -n "$gotrelbuilddir" + then + builddir=${KVM}/${relbuilddir} + fi + shift + ;; + --relbuilddir) + checkarg --relbuilddir "(relative pathname)" "$#" "$2" '^[^/]*$' '^--' + relbuilddir=$2 + gotrelbuilddir=1 + builddir=${KVM}/${relbuilddir} + shift + ;; + --results) + checkarg --results "(absolute pathname)" "$#" "$2" '^/' error + resdir=$2 + shift + ;; + *) + usage + ;; + esac + shift +done + +echo "builddir=$builddir" +echo "dur=$dur" +echo "KVM=$KVM" +echo "resdir=$resdir" + +PATH=${KVM}/bin:$PATH; export PATH +CONFIGFRAG=${KVM}/configs; export CONFIGFRAG + +if test -z "$resdir" +then + resdir=$KVM/res + mkdir $resdir || : + ds=`date +%Y.%m.%d-%H:%M:%S` + mkdir $resdir/$ds + echo Datestamp: $ds +else + mkdir -p "$resdir" + ds="" +fi +pwd > $resdir/$ds/testid.txt +if test -d .git +then + git status >> $resdir/$ds/testid.txt + git rev-parse HEAD >> $resdir/$ds/testid.txt +fi +builddir=$KVM/b1 +mkdir $builddir || : + +for CF in $configs +do + rd=$resdir/$ds/$CF + mkdir $rd || : + echo Results directory: $rd + kvm-test-1-rcu.sh $CONFIGFRAG/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.n_barrier_cbs=4 rcutorture.verbose=1" +done +# Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh new file mode 100755 index 000000000000..2e0e9f7ebbb0 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Check the build output from an rcutorture run for goodness. +# The "file" is a pathname on the local system, and "title" is +# a text string for error-message purposes. +# +# The file must contain kernel build output. +# +# Usage: +# sh parse-build.sh file title +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +T=$1 +title=$2 + +if grep -q CC < $T +then + : +else + echo $title no build + exit 1 +fi + +if egrep -q "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T +then + echo $title build errors: + egrep "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T + exit 2 +fi +exit 0 diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh new file mode 100755 index 000000000000..bc1496fa1263 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Check the console output from an rcutorture run for oopses. +# The "file" is a pathname on the local system, and "title" is +# a text string for error-message purposes. +# +# Usage: +# sh parse-console.sh file title +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +T=/tmp/abat-chk-badness.sh.$$ +trap 'rm -f $T' 0 + +file="$1" +title="$2" + +egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T +if test -s $T +then + echo Assertion failure in $file $title + cat $T +fi diff --git a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh new file mode 100755 index 000000000000..37368a046a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Check the console output from an rcutorture run for goodness. +# The "file" is a pathname on the local system, and "title" is +# a text string for error-message purposes. +# +# The file must contain rcutorture output, but can be interspersed +# with other dmesg text. +# +# Usage: +# sh parse-rcutorture.sh file title +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2011 +# +# Authors: Paul E. McKenney + +T=/tmp/parse-rcutorture.sh.$$ +file="$1" +title="$2" + +trap 'rm -f $T.seq' 0 + +# check for presence of rcutorture.txt file + +if test -f "$file" -a -r "$file" +then + : +else + echo $title unreadable rcutorture.txt file: $file + exit 1 +fi + +# check for abject failure + +if grep -q FAILURE $file || grep -q -e '-torture.*!!!' $file +then + nerrs=`grep --binary-files=text '!!!' $file | tail -1 | awk '{for (i=NF-8;i<=NF;i++) sum+=$i; } END {print sum}'` + echo $title FAILURE, $nerrs instances + echo " " $url + exit +fi + +grep --binary-files=text 'torture:.*ver:' $file | grep --binary-files=text -v '(null)' | sed -e 's/^(initramfs)[^]]*] //' -e 's/^\[[^]]*] //' | +awk ' +BEGIN { + ver = 0; + badseq = 0; + } + + { + if (!badseq && ($5 + 0 != $5 || $5 <= ver)) { + badseqno1 = ver; + badseqno2 = $5; + badseqnr = NR; + badseq = 1; + } + ver = $5 + } + +END { + if (badseq) { + if (badseqno1 == badseqno2 && badseqno2 == ver) + print "RCU GP HANG at " ver " rcutorture stat " badseqnr; + else + print "BAD SEQ " badseqno1 ":" badseqno2 " last:" ver " RCU version " badseqnr; + } + }' > $T.seq + +if grep -q SUCCESS $file +then + if test -s $T.seq + then + echo WARNING $title `cat $T.seq` + echo " " $file + exit 2 + fi +else + if grep -q RCU_HOTPLUG $file + then + echo WARNING: HOTPLUG FAILURES $title `cat $T.seq` + echo " " $file + exit 3 + fi + echo $title no success message, `grep --binary-files=text 'ver:' $file | wc -l` successful RCU version messages + if test -s $T.seq + then + echo WARNING $title `cat $T.seq` + fi + exit 2 +fi diff --git a/tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP @@ -0,0 +1,19 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP @@ -0,0 +1,18 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp new file mode 100644 index 000000000000..0ccc36d72738 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp @@ -0,0 +1,19 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_NR_CPUS=1 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..3f640cf84973 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP @@ -0,0 +1,26 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=y +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..285da2dd8ac3 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=14 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/NT1-nh b/tools/testing/selftests/rcutorture/configs/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/NT1-nh @@ -0,0 +1,23 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/NT3-NH b/tools/testing/selftests/rcutorture/configs/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/NT3-NH @@ -0,0 +1,20 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp @@ -0,0 +1,28 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_PROVE_RCU_DELAY=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp new file mode 100644 index 000000000000..f4c9175828bf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp @@ -0,0 +1,18 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=n +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..77a8c5b75763 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=n +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all new file mode 100644 index 000000000000..0eecebc6e95f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=y +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none new file mode 100644 index 000000000000..0eecebc6e95f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=y +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp new file mode 100644 index 000000000000..588bc70420cd --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=n +CONFIG_RCU_NOCB_CPU_ZERO=y +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/PT1-nh b/tools/testing/selftests/rcutorture/configs/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/PT1-nh @@ -0,0 +1,23 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/PT2-NH b/tools/testing/selftests/rcutorture/configs/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/PT2-NH @@ -0,0 +1,22 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a b/tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a new file mode 100644 index 000000000000..9dbcde3a517e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a @@ -0,0 +1,23 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=n +CONFIG_NO_HZ_FULL=y +CONFIG_NO_HZ_FULL_SYSIDLE=n +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a b/tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a new file mode 100644 index 000000000000..d24dd6148ebf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a @@ -0,0 +1,26 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=n +CONFIG_NO_HZ_FULL=y +CONFIG_NO_HZ_FULL_SYSIDLE=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y + diff --git a/tools/testing/selftests/rcutorture/doc/initrd.txt b/tools/testing/selftests/rcutorture/doc/initrd.txt new file mode 100644 index 000000000000..49d134c25c04 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/initrd.txt @@ -0,0 +1,90 @@ +This document describes one way to create the initrd directory hierarchy +in order to allow an initrd to be built into your kernel. The trick +here is to steal the initrd file used on your Linux laptop, Ubuntu in +this case. There are probably much better ways of doing this. + +That said, here are the commands: + +------------------------------------------------------------------------ +zcat /initrd.img > /tmp/initrd.img.zcat +mkdir initrd +cd initrd +cpio -id < /tmp/initrd.img.zcat +------------------------------------------------------------------------ + +Interestingly enough, if you are running rcutorture, you don't really +need userspace in many cases. Running without userspace has the +advantage of allowing you to test your kernel independently of the +distro in place, the root-filesystem layout, and so on. To make this +happen, put the following script in the initrd's tree's "/init" file, +with 0755 mode. + +------------------------------------------------------------------------ +#!/bin/sh + +[ -d /dev ] || mkdir -m 0755 /dev +[ -d /root ] || mkdir -m 0700 /root +[ -d /sys ] || mkdir /sys +[ -d /proc ] || mkdir /proc +[ -d /tmp ] || mkdir /tmp +mkdir -p /var/lock +mount -t sysfs -o nodev,noexec,nosuid sysfs /sys +mount -t proc -o nodev,noexec,nosuid proc /proc +# Some things don't work properly without /etc/mtab. +ln -sf /proc/mounts /etc/mtab + +# Note that this only becomes /dev on the real filesystem if udev's scripts +# are used; which they will be, but it's worth pointing out +if ! mount -t devtmpfs -o mode=0755 udev /dev; then + echo "W: devtmpfs not available, falling back to tmpfs for /dev" + mount -t tmpfs -o mode=0755 udev /dev + [ -e /dev/console ] || mknod --mode=600 /dev/console c 5 1 + [ -e /dev/kmsg ] || mknod --mode=644 /dev/kmsg c 1 11 + [ -e /dev/null ] || mknod --mode=666 /dev/null c 1 3 +fi + +mkdir /dev/pts +mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true +mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run +mkdir /run/initramfs +# compatibility symlink for the pre-oneiric locations +ln -s /run/initramfs /dev/.initramfs + +# Export relevant variables +export ROOT= +export ROOTDELAY= +export ROOTFLAGS= +export ROOTFSTYPE= +export IP= +export BOOT= +export BOOTIF= +export UBIMTD= +export break= +export init=/sbin/init +export quiet=n +export readonly=y +export rootmnt=/root +export debug= +export panic= +export blacklist= +export resume= +export resume_offset= +export recovery= + +for i in /sys/devices/system/cpu/cpu*/online +do + case $i in + '/sys/devices/system/cpu/cpu0/online') + ;; + '/sys/devices/system/cpu/cpu*/online') + ;; + *) + echo 1 > $i + ;; + esac +done + +while : +do + sleep 10 +done diff --git a/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt b/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt new file mode 100644 index 000000000000..66efb59a1bd1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt @@ -0,0 +1,42 @@ +This document describes one way to created the rcu-test-image file +that contains the filesystem used by the guest-OS kernel. There are +probably much better ways of doing this, and this filesystem could no +doubt be smaller. It is probably also possible to simply download +an appropriate image from any number of places. + +That said, here are the commands: + +------------------------------------------------------------------------ +dd if=/dev/zero of=rcu-test-image bs=400M count=1 +mkfs.ext3 ./rcu-test-image +sudo mount -o loop ./rcu-test-image /mnt + +# Replace "precise" below with your favorite Ubuntu release. +# Empirical evidence says this image will work for 64-bit, but... +# Note that debootstrap does take a few minutes to run. Or longer. +sudo debootstrap --verbose --arch i386 precise /mnt http://archive.ubuntu.com/ubuntu +cat << '___EOF___' | sudo dd of=/mnt/etc/fstab +# UNCONFIGURED FSTAB FOR BASE SYSTEM +# +/dev/vda / ext3 defaults 1 1 +dev /dev tmpfs rw 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +devpts /dev/pts devpts gid=5,mode=620 0 0 +sysfs /sys sysfs defaults 0 0 +proc /proc proc defaults 0 0 +___EOF___ +sudo umount /mnt +------------------------------------------------------------------------ + + +References: + + http://sripathikodi.blogspot.com/2010/02/creating-kvm-bootable-fedora-system.html + https://help.ubuntu.com/community/KVM/CreateGuests + https://help.ubuntu.com/community/JeOSVMBuilder + http://wiki.libvirt.org/page/UbuntuKVMWalkthrough + http://www.moe.co.uk/2011/01/07/pci_add_option_rom-failed-to-find-romfile-pxe-rtl8139-bin/ -- "apt-get install kvm-pxe" + http://www.landley.net/writing/rootfs-howto.html + http://en.wikipedia.org/wiki/Initrd + http://en.wikipedia.org/wiki/Cpio + http://wiki.libvirt.org/page/UbuntuKVMWalkthrough -- cgit v1.2.3 From 847bfd254399eebc8752d39f43628e6c1baac076 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sat, 28 Sep 2013 18:44:11 -0700 Subject: rcutorture: Add datestamp argument to kvm.sh Allow datestamp to be specified to allow tests to be broken up and run in parallel. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 46c75ee2f528..9fcceed81079 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -50,11 +50,13 @@ configs=" sysidleY.2013.06.19a \ PT2-NH \ NT1-nh \ NT3-NH" +ds=`date +%Y.%m.%d-%H:%M:%S` usage () { echo "Usage: $scriptname optional arguments:" echo " --builddir absolute-pathname" echo " --configs \"config-file list\"" + echo " --datestamp string" echo " --duration minutes" echo " --rcu-kvm absolute-pathname" echo " --results absolute-pathname" @@ -98,6 +100,11 @@ do configs="$2" shift ;; + --datestamp) + checkarg --datestamp "(relative pathname)" "$#" "$2" '^[^/]*$' '^--' + ds=$2 + shift + ;; --duration) checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' error dur=$2 @@ -147,13 +154,12 @@ if test -z "$resdir" then resdir=$KVM/res mkdir $resdir || : - ds=`date +%Y.%m.%d-%H:%M:%S` - mkdir $resdir/$ds - echo Datestamp: $ds else - mkdir -p "$resdir" - ds="" + mkdir -p "$resdir" || : fi +mkdir $resdir/$ds +echo Datestamp: $ds + pwd > $resdir/$ds/testid.txt if test -d .git then -- cgit v1.2.3 From bb918535a15a0c9ca217a99394dcae0c44711f1c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sat, 28 Sep 2013 20:37:45 -0700 Subject: rcutorture: Add kernel-version argument Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../selftests/rcutorture/bin/kvm-test-1-rcu.sh | 1 + tools/testing/selftests/rcutorture/bin/kvm.sh | 9 ++++++- .../rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP | 19 +++++++++++++++ .../rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp | 22 +++++++++++++++++ .../rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP | 18 ++++++++++++++ .../rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp | 22 +++++++++++++++++ .../selftests/rcutorture/configs/v0.0/NT1-nh | 23 ++++++++++++++++++ .../selftests/rcutorture/configs/v0.0/NT3-NH | 20 ++++++++++++++++ .../rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP | 20 ++++++++++++++++ .../rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP | 22 +++++++++++++++++ .../rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp | 28 ++++++++++++++++++++++ .../selftests/rcutorture/configs/v0.0/PT1-nh | 23 ++++++++++++++++++ .../selftests/rcutorture/configs/v0.0/PT2-NH | 22 +++++++++++++++++ .../rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP | 19 +++++++++++++++ .../rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp | 22 +++++++++++++++++ .../rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP | 18 ++++++++++++++ .../rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp | 22 +++++++++++++++++ .../selftests/rcutorture/configs/v3.3/NT1-nh | 23 ++++++++++++++++++ .../selftests/rcutorture/configs/v3.3/NT3-NH | 20 ++++++++++++++++ .../rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP | 20 ++++++++++++++++ .../rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP | 22 +++++++++++++++++ .../rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp | 28 ++++++++++++++++++++++ .../selftests/rcutorture/configs/v3.3/PT1-nh | 23 ++++++++++++++++++ .../selftests/rcutorture/configs/v3.3/PT2-NH | 22 +++++++++++++++++ .../rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP | 19 +++++++++++++++ .../rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp | 22 +++++++++++++++++ .../rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP | 18 ++++++++++++++ .../rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp | 22 +++++++++++++++++ .../selftests/rcutorture/configs/v3.5/NT1-nh | 23 ++++++++++++++++++ .../selftests/rcutorture/configs/v3.5/NT3-NH | 20 ++++++++++++++++ .../rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP | 20 ++++++++++++++++ .../rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp | 20 ++++++++++++++++ .../rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP | 22 +++++++++++++++++ .../rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp | 28 ++++++++++++++++++++++ .../selftests/rcutorture/configs/v3.5/PT1-nh | 23 ++++++++++++++++++ .../selftests/rcutorture/configs/v3.5/PT2-NH | 22 +++++++++++++++++ 44 files changed, 906 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/NT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/NT3-NH create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/PT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/PT2-NH create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/NT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/NT3-NH create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/PT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/PT2-NH create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/NT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/NT3-NH create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/PT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/PT2-NH diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index ae5c2ff4c0ce..3b53078c5ff2 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -61,6 +61,7 @@ then fi cp $config_template $resdir/ConfigFragment echo ' ---' `date`: Starting build +echo ' ---' Kconfig fragment at: $config_template cat << '___EOF___' >> $T CONFIG_RCU_TORTURE_TEST=y ___EOF___ diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 9fcceed81079..7deb7b44d647 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -51,6 +51,7 @@ configs=" sysidleY.2013.06.19a \ NT1-nh \ NT3-NH" ds=`date +%Y.%m.%d-%H:%M:%S` +kversion="" usage () { echo "Usage: $scriptname optional arguments:" @@ -58,6 +59,7 @@ usage () { echo " --configs \"config-file list\"" echo " --datestamp string" echo " --duration minutes" + echo " --kversion vN.NN" echo " --rcu-kvm absolute-pathname" echo " --results absolute-pathname" echo " --relbuilddir relative-pathname" @@ -110,6 +112,11 @@ do dur=$2 shift ;; + --kversion) + checkarg --kversion "(kernel version)" $# "$2" '^v[0-9.]*$' error + kversion=$2 + shift + ;; --rcu-kvm) checkarg --rcu-kvm "(absolute pathname)" "$#" "$2" '^/' error KVM=$2; export KVM @@ -174,6 +181,6 @@ do rd=$resdir/$ds/$CF mkdir $rd || : echo Results directory: $rd - kvm-test-1-rcu.sh $CONFIGFRAG/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.n_barrier_cbs=4 rcutorture.verbose=1" + kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.n_barrier_cbs=4 rcutorture.verbose=1" done # Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP @@ -0,0 +1,19 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP @@ -0,0 +1,18 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/NT1-nh b/tools/testing/selftests/rcutorture/configs/v0.0/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/NT1-nh @@ -0,0 +1,23 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/NT3-NH b/tools/testing/selftests/rcutorture/configs/v0.0/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/NT3-NH @@ -0,0 +1,20 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp @@ -0,0 +1,28 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_PROVE_RCU_DELAY=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/PT1-nh b/tools/testing/selftests/rcutorture/configs/v0.0/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/PT1-nh @@ -0,0 +1,23 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/PT2-NH b/tools/testing/selftests/rcutorture/configs/v0.0/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/PT2-NH @@ -0,0 +1,22 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP @@ -0,0 +1,19 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP @@ -0,0 +1,18 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/NT1-nh b/tools/testing/selftests/rcutorture/configs/v3.3/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/NT1-nh @@ -0,0 +1,23 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/NT3-NH b/tools/testing/selftests/rcutorture/configs/v3.3/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/NT3-NH @@ -0,0 +1,20 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp @@ -0,0 +1,28 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_PROVE_RCU_DELAY=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/PT1-nh b/tools/testing/selftests/rcutorture/configs/v3.3/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/PT1-nh @@ -0,0 +1,23 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/PT2-NH b/tools/testing/selftests/rcutorture/configs/v3.3/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/PT2-NH @@ -0,0 +1,22 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP @@ -0,0 +1,19 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP @@ -0,0 +1,18 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/NT1-nh b/tools/testing/selftests/rcutorture/configs/v3.5/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/NT1-nh @@ -0,0 +1,23 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/NT3-NH b/tools/testing/selftests/rcutorture/configs/v3.5/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/NT3-NH @@ -0,0 +1,20 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp @@ -0,0 +1,28 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_PROVE_RCU_DELAY=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/PT1-nh b/tools/testing/selftests/rcutorture/configs/v3.5/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/PT1-nh @@ -0,0 +1,23 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/PT2-NH b/tools/testing/selftests/rcutorture/configs/v3.5/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/PT2-NH @@ -0,0 +1,22 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + -- cgit v1.2.3 From 4275be83b807c2926d2b23e67eb61692a1810080 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 29 Sep 2013 11:13:46 -0700 Subject: rcutorture: Add per-version default Kconfig fragments and module parameters Different Kconfig parameters apply to different kernel versions, as do different rcutorture module parameters. This commit allows the rcutorture test scripts to adjust for different kernel versions. Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../testing/selftests/rcutorture/bin/functions.sh | 7 ++-- .../selftests/rcutorture/bin/kvm-test-1-rcu.sh | 12 ++---- tools/testing/selftests/rcutorture/bin/kvm.sh | 26 ++++-------- tools/testing/selftests/rcutorture/configs/CFLIST | 17 ++++++++ .../selftests/rcutorture/configs/v0.0/CFLIST | 14 +++++++ .../rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP | 1 - .../rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP | 1 - .../rcutorture/configs/v0.0/ver_functions.sh | 35 ++++++++++++++++ .../selftests/rcutorture/configs/v3.3/CFLIST | 14 +++++++ .../rcutorture/configs/v3.3/ver_functions.sh | 41 +++++++++++++++++++ .../selftests/rcutorture/configs/v3.5/CFLIST | 14 +++++++ .../rcutorture/configs/v3.5/ver_functions.sh | 46 ++++++++++++++++++++++ .../selftests/rcutorture/configs/ver_functions.sh | 46 ++++++++++++++++++++++ 13 files changed, 242 insertions(+), 32 deletions(-) create mode 100644 tools/testing/selftests/rcutorture/configs/CFLIST create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/CFLIST create mode 100644 tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/CFLIST create mode 100644 tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/CFLIST create mode 100644 tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh create mode 100644 tools/testing/selftests/rcutorture/configs/ver_functions.sh diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index db1c32acdcf6..d4c15f81cd27 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -32,11 +32,10 @@ bootparam_hotplug_cpu () { # # Returns 1 if the config fragment specifies hotplug CPU. configfrag_hotplug_cpu () { - cf=$1 - if test ! -r $cf + if test ! -r "$1" then - echo Unreadable config fragment $cf 1>&2 + echo Unreadable config fragment "$1" 1>&2 exit -1 fi - grep -q '^CONFIG_HOTPLUG_CPU=y$' $cf + grep -q '^CONFIG_HOTPLUG_CPU=y$' "$1" } diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 3b53078c5ff2..0a3f037a8bb3 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -44,6 +44,7 @@ T=/tmp/kvm-test-1-rcu.sh.$$ trap 'rm -rf $T' 0 . $KVM/bin/functions.sh +. $KVPATH/ver_functions.sh config_template=${1} title=`echo $config_template | sed -e 's/^.*\///'` @@ -133,14 +134,9 @@ else fi # Generate CPU-hotplug boot parameters -if ! bootparam_hotplug_cpu "$bootargs" -then - if configfrag_hotplug_cpu $builddir/.config - then - echo Kernel configured for CPU hotplug, adding rcutorture. - bootargs="$bootargs rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30" - fi -fi +boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" +# Generate rcu_barrier() boot parameter +boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 7deb7b44d647..92f726b01044 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -33,23 +33,7 @@ dur=30 KVM=`pwd`/tools/testing/selftests/rcutorture; export KVM builddir=${KVM}/b1 resdir="" -configs=" sysidleY.2013.06.19a \ - sysidleN.2013.06.19a \ - P1-S-T-NH-SD-SMP-HP \ - P2-2-t-nh-sd-SMP-hp \ - P3-3-T-nh-SD-SMP-hp \ - P4-A-t-NH-sd-SMP-HP \ - P5-U-T-NH-sd-SMP-hp \ - P6---t-nh-SD-smp-hp \ - N1-S-T-NH-SD-SMP-HP \ - N2-2-t-nh-sd-SMP-hp \ - N3-3-T-nh-SD-SMP-hp \ - N4-A-t-NH-sd-SMP-HP \ - N5-U-T-NH-sd-SMP-hp \ - PT1-nh \ - PT2-NH \ - NT1-nh \ - NT3-NH" +configs="" ds=`date +%Y.%m.%d-%H:%M:%S` kversion="" @@ -156,6 +140,12 @@ echo "resdir=$resdir" PATH=${KVM}/bin:$PATH; export PATH CONFIGFRAG=${KVM}/configs; export CONFIGFRAG +KVPATH=${CONFIGFRAG}/$kversion; export KVPATH + +if test -z "$configs" +then + configs="`cat $CONFIGFRAG/$kversion/CFLIST`" +fi if test -z "$resdir" then @@ -181,6 +171,6 @@ do rd=$resdir/$ds/$CF mkdir $rd || : echo Results directory: $rd - kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.n_barrier_cbs=4 rcutorture.verbose=1" + kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1" done # Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task diff --git a/tools/testing/selftests/rcutorture/configs/CFLIST b/tools/testing/selftests/rcutorture/configs/CFLIST new file mode 100644 index 000000000000..da4cbc668f2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/CFLIST @@ -0,0 +1,17 @@ +sysidleY.2013.06.19a +sysidleN.2013.06.19a +P1-S-T-NH-SD-SMP-HP +P2-2-t-nh-sd-SMP-hp +P3-3-T-nh-SD-SMP-hp +P4-A-t-NH-sd-SMP-HP +P5-U-T-NH-sd-SMP-hp +P6---t-nh-SD-smp-hp +N1-S-T-NH-SD-SMP-HP +N2-2-t-nh-sd-SMP-hp +N3-3-T-nh-SD-SMP-hp +N4-A-t-NH-sd-SMP-HP +N5-U-T-NH-sd-SMP-hp +PT1-nh +PT2-NH +NT1-nh +NT3-NH diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST b/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST @@ -0,0 +1,14 @@ +P1-S-T-NH-SD-SMP-HP +P2-2-t-nh-sd-SMP-hp +P3-3-T-nh-SD-SMP-hp +P4-A-t-NH-sd-SMP-HP +P5-U-T-NH-sd-SMP-hp +N1-S-T-NH-SD-SMP-HP +N2-2-t-nh-sd-SMP-hp +N3-3-T-nh-SD-SMP-hp +N4-A-t-NH-sd-SMP-HP +N5-U-T-NH-sd-SMP-hp +PT1-nh +PT2-NH +NT1-nh +NT3-NH diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP index d81e11d280aa..d3ef873eb6e7 100644 --- a/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP @@ -1,5 +1,4 @@ CONFIG_RCU_TRACE=y -CONFIG_RCU_FAST_NO_HZ=y CONFIG_NO_HZ=y CONFIG_SMP=y CONFIG_RCU_FANOUT=8 diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP index 9647c44cf4b7..f72402d7c13d 100644 --- a/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP @@ -1,7 +1,6 @@ CONFIG_RCU_TRACE=y CONFIG_RCU_CPU_STALL_INFO=y CONFIG_NO_HZ=y -CONFIG_RCU_FAST_NO_HZ=y CONFIG_SMP=y CONFIG_RCU_FANOUT=8 CONFIG_NR_CPUS=8 diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh new file mode 100644 index 000000000000..af7d59bf0988 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Kernel-version-dependent shell functions for the rest of the scripts. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +# rcutorture_param_n_barrier_cbs bootparam-string +# +# Adds n_barrier_cbs rcutorture module parameter to kernels having it. +rcutorture_param_n_barrier_cbs () { + echo $1 +} + +# rcutorture_param_onoff bootparam-string config-file +# +# Adds onoff rcutorture module parameters to kernels having it. +rcutorture_param_onoff () { + echo $1 +} diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST @@ -0,0 +1,14 @@ +P1-S-T-NH-SD-SMP-HP +P2-2-t-nh-sd-SMP-hp +P3-3-T-nh-SD-SMP-hp +P4-A-t-NH-sd-SMP-HP +P5-U-T-NH-sd-SMP-hp +N1-S-T-NH-SD-SMP-HP +N2-2-t-nh-sd-SMP-hp +N3-3-T-nh-SD-SMP-hp +N4-A-t-NH-sd-SMP-HP +N5-U-T-NH-sd-SMP-hp +PT1-nh +PT2-NH +NT1-nh +NT3-NH diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh new file mode 100644 index 000000000000..921fec931114 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Kernel-version-dependent shell functions for the rest of the scripts. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +# rcutorture_param_n_barrier_cbs bootparam-string +# +# Adds n_barrier_cbs rcutorture module parameter to kernels having it. +rcutorture_param_n_barrier_cbs () { + echo $1 +} + +# rcutorture_param_onoff bootparam-string config-file +# +# Adds onoff rcutorture module parameters to kernels having it. +rcutorture_param_onoff () { + if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" + then + echo CPU-hotplug kernel, adding rcutorture onoff. + echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 + else + echo $1 + fi +} diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST @@ -0,0 +1,14 @@ +P1-S-T-NH-SD-SMP-HP +P2-2-t-nh-sd-SMP-hp +P3-3-T-nh-SD-SMP-hp +P4-A-t-NH-sd-SMP-HP +P5-U-T-NH-sd-SMP-hp +N1-S-T-NH-SD-SMP-HP +N2-2-t-nh-sd-SMP-hp +N3-3-T-nh-SD-SMP-hp +N4-A-t-NH-sd-SMP-HP +N5-U-T-NH-sd-SMP-hp +PT1-nh +PT2-NH +NT1-nh +NT3-NH diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh new file mode 100644 index 000000000000..401974455aee --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Kernel-version-dependent shell functions for the rest of the scripts. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +# rcutorture_param_n_barrier_cbs bootparam-string +# +# Adds n_barrier_cbs rcutorture module parameter to kernels having it. +rcutorture_param_n_barrier_cbs () { + if echo $1 | grep -q "rcutorture\.n_barrier_cbs" + then + echo $1 + else + echo $1 rcutorture.n_barrier_cbs=4 + fi +} + +# rcutorture_param_onoff bootparam-string config-file +# +# Adds onoff rcutorture module parameters to kernels having it. +rcutorture_param_onoff () { + if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" + then + echo CPU-hotplug kernel, adding rcutorture onoff. + echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 + else + echo $1 + fi +} diff --git a/tools/testing/selftests/rcutorture/configs/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/ver_functions.sh new file mode 100644 index 000000000000..f99f23bc3934 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/ver_functions.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Kernel-version-dependent shell functions for the rest of the scripts. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney + +# rcutorture_param_n_barrier_cbs bootparam-string +# +# Adds n_barrier_cbs rcutorture module parameter to kernels having it. +rcutorture_param_n_barrier_cbs () { + if echo $1 | grep -q "rcutorture\.n_barrier_cbs" + then + echo $1 + else + echo $1 rcutorture.n_barrier_cbs=4 + fi +} + +# rcutorture_param_onoff bootparam-string config-file +# +# Adds onoff rcutorture module parameters to kernels having it. +rcutorture_param_onoff () { + if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" + then + echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2 + echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 + else + echo $1 + fi +} -- cgit v1.2.3 From 0cc2441447eafd4e0742b6363e416967167c5137 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 29 Sep 2013 20:22:32 -0700 Subject: rcutorture: Add per-Kconfig fragment boot parameters Some Kconfig fragments require rcutorture module parameters to do optimal testing, for example, a configuration for SRCU would need rcutorture.torture_type=srcu. This commit therefore adds a per-Kconfig-fragment boot-parameter capability. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/functions.sh | 12 ++++++++++++ tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | 2 ++ 2 files changed, 14 insertions(+) diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index d4c15f81cd27..8f912419ed7f 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -28,6 +28,18 @@ bootparam_hotplug_cpu () { echo "$1" | grep -q "rcutorture\.onoff_" } +# configfrag_boot_params bootparam-string config-fragment-file +# +# Adds boot parameters from the .boot file, if any. +configfrag_boot_params () { + if test -r "$2.boot" + then + echo $1 `grep -v '^#' "$2.boot" | tr '\012' ' '` + else + echo $1 + fi +} + # configfrag_hotplug_cpu config-fragment-file # # Returns 1 if the config fragment specifies hotplug CPU. diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 0a3f037a8bb3..618aa4d766d3 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -137,6 +137,8 @@ fi boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" # Generate rcu_barrier() boot parameter boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" +# Pull in Kconfig-fragment boot parameters +boot_args="`configfrag_boot_params "$boot_args" "$config_template"`" echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & -- cgit v1.2.3 From ccb51a893c8c2b7c933b93f5c298e00b9d6eb76f Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 30 Sep 2013 08:09:12 -0700 Subject: rcutorture: Add v3.12 version, which adds sysidle testing The v3.12 version of the kernel added the CONFIG_NO_HZ_FULL_SYSIDLE Kconfig parameter, so this commit adds a version transition at that point. Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../selftests/rcutorture/configs/v3.12/CFLIST | 17 ++++++++++++ .../rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP | 19 ++++++++++++++ .../rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp | 20 +++++++++++++++ .../rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp | 22 ++++++++++++++++ .../rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP | 18 +++++++++++++ .../rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp | 22 ++++++++++++++++ .../rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp | 19 ++++++++++++++ .../rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP | 26 +++++++++++++++++++ .../rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP | 22 ++++++++++++++++ .../selftests/rcutorture/configs/v3.12/NT1-nh | 23 +++++++++++++++++ .../selftests/rcutorture/configs/v3.12/NT3-NH | 20 +++++++++++++++ .../rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP | 20 +++++++++++++++ .../rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp | 20 +++++++++++++++ .../rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp | 20 +++++++++++++++ .../rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP | 22 ++++++++++++++++ .../rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp | 28 ++++++++++++++++++++ .../rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp | 18 +++++++++++++ .../rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP | 30 ++++++++++++++++++++++ .../configs/v3.12/P7-4-T-NH-SD-SMP-HP-all | 30 ++++++++++++++++++++++ .../configs/v3.12/P7-4-T-NH-SD-SMP-HP-none | 30 ++++++++++++++++++++++ .../rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp | 30 ++++++++++++++++++++++ .../selftests/rcutorture/configs/v3.12/PT1-nh | 23 +++++++++++++++++ .../selftests/rcutorture/configs/v3.12/PT2-NH | 22 ++++++++++++++++ 23 files changed, 521 insertions(+) create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/CFLIST create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/NT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/NT3-NH create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-all create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-none create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/PT1-nh create mode 100644 tools/testing/selftests/rcutorture/configs/v3.12/PT2-NH diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.12/CFLIST new file mode 100644 index 000000000000..da4cbc668f2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/CFLIST @@ -0,0 +1,17 @@ +sysidleY.2013.06.19a +sysidleN.2013.06.19a +P1-S-T-NH-SD-SMP-HP +P2-2-t-nh-sd-SMP-hp +P3-3-T-nh-SD-SMP-hp +P4-A-t-NH-sd-SMP-HP +P5-U-T-NH-sd-SMP-hp +P6---t-nh-SD-smp-hp +N1-S-T-NH-SD-SMP-HP +N2-2-t-nh-sd-SMP-hp +N3-3-T-nh-SD-SMP-hp +N4-A-t-NH-sd-SMP-HP +N5-U-T-NH-sd-SMP-hp +PT1-nh +PT2-NH +NT1-nh +NT3-NH diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP @@ -0,0 +1,19 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP @@ -0,0 +1,18 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp new file mode 100644 index 000000000000..0ccc36d72738 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp @@ -0,0 +1,19 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_NR_CPUS=1 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..3f640cf84973 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP @@ -0,0 +1,26 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=y +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..285da2dd8ac3 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_KERNEL=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=14 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/NT1-nh b/tools/testing/selftests/rcutorture/configs/v3.12/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/NT1-nh @@ -0,0 +1,23 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/NT3-NH b/tools/testing/selftests/rcutorture/configs/v3.12/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/NT3-NH @@ -0,0 +1,20 @@ +#CHECK#CONFIG_TINY_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=8 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=4 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp @@ -0,0 +1,20 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=n +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP @@ -0,0 +1,22 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp @@ -0,0 +1,28 @@ +CONFIG_RCU_TRACE=y +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=6 +CONFIG_NR_CPUS=8 +CONFIG_RCU_FANOUT_EXACT=y +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_PROVE_RCU_DELAY=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_RT_MUTEXES=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp new file mode 100644 index 000000000000..f4c9175828bf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp @@ -0,0 +1,18 @@ +CONFIG_RCU_TRACE=n +CONFIG_NO_HZ=n +CONFIG_SMP=n +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..77a8c5b75763 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=n +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-all b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-all new file mode 100644 index 000000000000..0eecebc6e95f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-all @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=y +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-none b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-none new file mode 100644 index 000000000000..0eecebc6e95f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-none @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=y +CONFIG_RCU_NOCB_CPU_ZERO=n +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp new file mode 100644 index 000000000000..588bc70420cd --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp @@ -0,0 +1,30 @@ +CONFIG_RCU_TRACE=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_RCU_FANOUT=2 +CONFIG_NR_CPUS=16 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_HOTPLUG_CPU=n +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_NONE=n +CONFIG_RCU_NOCB_CPU_ZERO=y +CONFIG_RCU_NOCB_CPU_ALL=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_OBJECTS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SLUB=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/PT1-nh b/tools/testing/selftests/rcutorture/configs/v3.12/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/PT1-nh @@ -0,0 +1,23 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_RCU_TRACE=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=n +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/PT2-NH b/tools/testing/selftests/rcutorture/configs/v3.12/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/PT2-NH @@ -0,0 +1,22 @@ +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_RCU_TORTURE_TEST=m +CONFIG_MODULE_UNLOAD=y +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +# +CONFIG_SMP=n +# +CONFIG_HOTPLUG_CPU=n +# +CONFIG_NO_HZ=y +# +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_PRINTK_TIME=y + -- cgit v1.2.3 From a0b8e0853a87ef008a819e8cbe905735934396da Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 30 Sep 2013 09:47:38 -0700 Subject: rcutorture: Add SRCU Kconfig-fragment files Use .boot facility to ease inclusion of SRCU into automated testing. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/configs/SRCU-N | 8 ++++++++ tools/testing/selftests/rcutorture/configs/SRCU-N.boot | 1 + tools/testing/selftests/rcutorture/configs/SRCU-P | 8 ++++++++ tools/testing/selftests/rcutorture/configs/SRCU-P.boot | 1 + 4 files changed, 18 insertions(+) create mode 100644 tools/testing/selftests/rcutorture/configs/SRCU-N create mode 100644 tools/testing/selftests/rcutorture/configs/SRCU-N.boot create mode 100644 tools/testing/selftests/rcutorture/configs/SRCU-P create mode 100644 tools/testing/selftests/rcutorture/configs/SRCU-P.boot diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-N b/tools/testing/selftests/rcutorture/configs/SRCU-N new file mode 100644 index 000000000000..10a0e27f4c75 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-N @@ -0,0 +1,8 @@ +CONFIG_RCU_TRACE=n +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-N.boot b/tools/testing/selftests/rcutorture/configs/SRCU-N.boot new file mode 100644 index 000000000000..238bfe3bd0cc --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-N.boot @@ -0,0 +1 @@ +rcutorture.torture_type=srcu diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-P b/tools/testing/selftests/rcutorture/configs/SRCU-P new file mode 100644 index 000000000000..6650e00c6d91 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-P @@ -0,0 +1,8 @@ +CONFIG_RCU_TRACE=n +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_HOTPLUG_CPU=y +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-P.boot b/tools/testing/selftests/rcutorture/configs/SRCU-P.boot new file mode 100644 index 000000000000..238bfe3bd0cc --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-P.boot @@ -0,0 +1 @@ +rcutorture.torture_type=srcu -- cgit v1.2.3 From 27ac1ddf214741d152909f89981ee2bdf16318c9 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 30 Sep 2013 12:32:45 -0700 Subject: rcutorture: Refactor TREE_RCU test cases The TREE_RCU test cases were first put in place many years ago, and have been incrementally modified rather than being reworked. This commit therefore completes a long-overdue reworking of the TREE_RCU test cases. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/configs/CFLIST | 26 +++--- .../rcutorture/configs/N1-S-T-NH-SD-SMP-HP | 19 ----- .../rcutorture/configs/N2-2-t-nh-sd-SMP-hp | 20 ----- .../rcutorture/configs/N3-3-T-nh-SD-SMP-hp | 22 ----- .../rcutorture/configs/N4-A-t-NH-sd-SMP-HP | 18 ---- .../rcutorture/configs/N5-U-T-NH-sd-SMP-hp | 22 ----- .../rcutorture/configs/N6---t-nh-SD-smp-hp | 19 ----- .../rcutorture/configs/N7-4-T-NH-SD-SMP-HP | 26 ------ .../rcutorture/configs/N8-2-T-NH-SD-SMP-HP | 22 ----- .../rcutorture/configs/P1-S-T-NH-SD-SMP-HP | 20 ----- .../rcutorture/configs/P2-2-t-nh-sd-SMP-hp | 20 ----- .../rcutorture/configs/P3-3-T-nh-SD-SMP-hp | 20 ----- .../rcutorture/configs/P4-A-t-NH-sd-SMP-HP | 22 ----- .../rcutorture/configs/P5-U-T-NH-sd-SMP-hp | 28 ------- .../rcutorture/configs/P6---t-nh-SD-smp-hp | 18 ---- .../rcutorture/configs/P7-4-T-NH-SD-SMP-HP | 30 ------- .../rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all | 30 ------- .../rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none | 30 ------- .../rcutorture/configs/P7-4-T-NH-SD-SMP-hp | 30 ------- tools/testing/selftests/rcutorture/configs/TREE01 | 23 ++++++ .../selftests/rcutorture/configs/TREE01.boot | 1 + tools/testing/selftests/rcutorture/configs/TREE02 | 26 ++++++ tools/testing/selftests/rcutorture/configs/TREE03 | 23 ++++++ tools/testing/selftests/rcutorture/configs/TREE04 | 25 ++++++ .../selftests/rcutorture/configs/TREE04.boot | 1 + tools/testing/selftests/rcutorture/configs/TREE05 | 25 ++++++ .../selftests/rcutorture/configs/TREE05.boot | 1 + tools/testing/selftests/rcutorture/configs/TREE06 | 26 ++++++ tools/testing/selftests/rcutorture/configs/TREE07 | 24 ++++++ tools/testing/selftests/rcutorture/configs/TREE08 | 26 ++++++ tools/testing/selftests/rcutorture/configs/TREE09 | 21 +++++ .../rcutorture/configs/sysidleN.2013.06.19a | 23 ------ .../rcutorture/configs/sysidleY.2013.06.19a | 26 ------ .../selftests/rcutorture/doc/TREE_RCU-Kconfig.txt | 95 ++++++++++++++++++++++ 34 files changed, 328 insertions(+), 480 deletions(-) delete mode 100644 tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP delete mode 100644 tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP delete mode 100644 tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP delete mode 100644 tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP delete mode 100644 tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP delete mode 100644 tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP delete mode 100644 tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp delete mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP delete mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all delete mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none delete mode 100644 tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp create mode 100644 tools/testing/selftests/rcutorture/configs/TREE01 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE01.boot create mode 100644 tools/testing/selftests/rcutorture/configs/TREE02 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE03 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE04 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE04.boot create mode 100644 tools/testing/selftests/rcutorture/configs/TREE05 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE05.boot create mode 100644 tools/testing/selftests/rcutorture/configs/TREE06 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE07 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE08 create mode 100644 tools/testing/selftests/rcutorture/configs/TREE09 delete mode 100644 tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a delete mode 100644 tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a create mode 100644 tools/testing/selftests/rcutorture/doc/TREE_RCU-Kconfig.txt diff --git a/tools/testing/selftests/rcutorture/configs/CFLIST b/tools/testing/selftests/rcutorture/configs/CFLIST index da4cbc668f2a..884491b25c19 100644 --- a/tools/testing/selftests/rcutorture/configs/CFLIST +++ b/tools/testing/selftests/rcutorture/configs/CFLIST @@ -1,17 +1,13 @@ -sysidleY.2013.06.19a -sysidleN.2013.06.19a -P1-S-T-NH-SD-SMP-HP -P2-2-t-nh-sd-SMP-hp -P3-3-T-nh-SD-SMP-hp -P4-A-t-NH-sd-SMP-HP -P5-U-T-NH-sd-SMP-hp -P6---t-nh-SD-smp-hp -N1-S-T-NH-SD-SMP-HP -N2-2-t-nh-sd-SMP-hp -N3-3-T-nh-SD-SMP-hp -N4-A-t-NH-sd-SMP-HP -N5-U-T-NH-sd-SMP-hp -PT1-nh -PT2-NH +TREE01 +TREE02 +TREE03 +TREE04 +TREE05 +TREE06 +TREE07 +TREE08 +TREE09 +SRCU-N +SRCU-P NT1-nh NT3-NH diff --git a/tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP deleted file mode 100644 index d81e11d280aa..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N1-S-T-NH-SD-SMP-HP +++ /dev/null @@ -1,19 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_RCU_FAST_NO_HZ=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=8 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp deleted file mode 100644 index 02e418572b1b..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N2-2-t-nh-sd-SMP-hp +++ /dev/null @@ -1,20 +0,0 @@ -CONFIG_RCU_TRACE=n -CONFIG_NO_HZ=n -CONFIG_SMP=y -CONFIG_RCU_FANOUT=4 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp deleted file mode 100644 index b3100f69c8cf..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N3-3-T-nh-SD-SMP-hp +++ /dev/null @@ -1,22 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_NO_HZ=n -CONFIG_SMP=y -CONFIG_RCU_FANOUT=2 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP deleted file mode 100644 index c56b44530725..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N4-A-t-NH-sd-SMP-HP +++ /dev/null @@ -1,18 +0,0 @@ -CONFIG_RCU_TRACE=n -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=6 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp deleted file mode 100644 index 90d924fea9e9..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N5-U-T-NH-sd-SMP-hp +++ /dev/null @@ -1,22 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_DEBUG_KERNEL=y -CONFIG_RCU_CPU_STALL_INFO=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=6 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=y -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp deleted file mode 100644 index 0ccc36d72738..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N6---t-nh-SD-smp-hp +++ /dev/null @@ -1,19 +0,0 @@ -CONFIG_RCU_TRACE=n -CONFIG_NO_HZ=n -CONFIG_SMP=y -CONFIG_NR_CPUS=1 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP deleted file mode 100644 index 3f640cf84973..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N7-4-T-NH-SD-SMP-HP +++ /dev/null @@ -1,26 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_DEBUG_KERNEL=y -CONFIG_RCU_CPU_STALL_INFO=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=2 -CONFIG_NR_CPUS=16 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_RCU_NOCB_CPU=y -CONFIG_RCU_NOCB_CPU_NONE=y -CONFIG_RCU_NOCB_CPU_ZERO=n -CONFIG_RCU_NOCB_CPU_ALL=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP deleted file mode 100644 index 285da2dd8ac3..000000000000 --- a/tools/testing/selftests/rcutorture/configs/N8-2-T-NH-SD-SMP-HP +++ /dev/null @@ -1,22 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_DEBUG_KERNEL=y -CONFIG_RCU_CPU_STALL_INFO=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=14 -CONFIG_NR_CPUS=16 -CONFIG_RCU_FANOUT_EXACT=y -CONFIG_HOTPLUG_CPU=y -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -#CHECK#CONFIG_TREE_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP deleted file mode 100644 index 9647c44cf4b7..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P1-S-T-NH-SD-SMP-HP +++ /dev/null @@ -1,20 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_RCU_CPU_STALL_INFO=y -CONFIG_NO_HZ=y -CONFIG_RCU_FAST_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=8 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp deleted file mode 100644 index 0f3b667d2a9f..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P2-2-t-nh-sd-SMP-hp +++ /dev/null @@ -1,20 +0,0 @@ -CONFIG_RCU_TRACE=n -CONFIG_NO_HZ=n -CONFIG_SMP=y -CONFIG_RCU_FANOUT=4 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp deleted file mode 100644 index b035e141bf2a..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P3-3-T-nh-SD-SMP-hp +++ /dev/null @@ -1,20 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_NO_HZ=n -CONFIG_SMP=y -CONFIG_RCU_FANOUT=2 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP deleted file mode 100644 index 3ccf6a9447f5..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P4-A-t-NH-sd-SMP-HP +++ /dev/null @@ -1,22 +0,0 @@ -CONFIG_RCU_TRACE=n -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=6 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_RT_MUTEXES=y -CONFIG_RCU_BOOST=y -CONFIG_RCU_BOOST_PRIO=2 -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp deleted file mode 100644 index ef624ce73d8e..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P5-U-T-NH-sd-SMP-hp +++ /dev/null @@ -1,28 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_RCU_CPU_STALL_INFO=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=6 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=y -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_DEBUG_KERNEL=y -CONFIG_PROVE_RCU_DELAY=y -CONFIG_DEBUG_OBJECTS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y -CONFIG_RT_MUTEXES=y -CONFIG_RCU_BOOST=y -CONFIG_RCU_BOOST_PRIO=2 -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp deleted file mode 100644 index f4c9175828bf..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P6---t-nh-SD-smp-hp +++ /dev/null @@ -1,18 +0,0 @@ -CONFIG_RCU_TRACE=n -CONFIG_NO_HZ=n -CONFIG_SMP=n -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP deleted file mode 100644 index 77a8c5b75763..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP +++ /dev/null @@ -1,30 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=2 -CONFIG_NR_CPUS=16 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_RCU_NOCB_CPU=y -CONFIG_RCU_NOCB_CPU_NONE=n -CONFIG_RCU_NOCB_CPU_ZERO=n -CONFIG_RCU_NOCB_CPU_ALL=y -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_OBJECTS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLUB=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all deleted file mode 100644 index 0eecebc6e95f..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-all +++ /dev/null @@ -1,30 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=2 -CONFIG_NR_CPUS=16 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_RCU_NOCB_CPU=y -CONFIG_RCU_NOCB_CPU_NONE=y -CONFIG_RCU_NOCB_CPU_ZERO=n -CONFIG_RCU_NOCB_CPU_ALL=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_OBJECTS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLUB=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none deleted file mode 100644 index 0eecebc6e95f..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-HP-none +++ /dev/null @@ -1,30 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=2 -CONFIG_NR_CPUS=16 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_RCU_NOCB_CPU=y -CONFIG_RCU_NOCB_CPU_NONE=y -CONFIG_RCU_NOCB_CPU_ZERO=n -CONFIG_RCU_NOCB_CPU_ALL=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_OBJECTS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLUB=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp deleted file mode 100644 index 588bc70420cd..000000000000 --- a/tools/testing/selftests/rcutorture/configs/P7-4-T-NH-SD-SMP-hp +++ /dev/null @@ -1,30 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=2 -CONFIG_NR_CPUS=16 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=n -CONFIG_RCU_NOCB_CPU=y -CONFIG_RCU_NOCB_CPU_NONE=n -CONFIG_RCU_NOCB_CPU_ZERO=y -CONFIG_RCU_NOCB_CPU_ALL=n -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_OBJECTS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_SLUB=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/TREE01 b/tools/testing/selftests/rcutorture/configs/TREE01 new file mode 100644 index 000000000000..141119a00044 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE01 @@ -0,0 +1,23 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_RCU_TRACE=y +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_FANOUT=8 +CONFIG_RCU_FANOUT_EXACT=n +CONFIG_RCU_NOCB_CPU=y +CONFIG_RCU_NOCB_CPU_ZERO=y +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_RCU_BOOST=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE01.boot b/tools/testing/selftests/rcutorture/configs/TREE01.boot new file mode 100644 index 000000000000..0fc8a3428938 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE01.boot @@ -0,0 +1 @@ +rcutorture.torture_type=rcu_bh diff --git a/tools/testing/selftests/rcutorture/configs/TREE02 b/tools/testing/selftests/rcutorture/configs/TREE02 new file mode 100644 index 000000000000..2d4d09608528 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE02 @@ -0,0 +1,26 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_FAST_NO_HZ=n +CONFIG_RCU_TRACE=n +CONFIG_HOTPLUG_CPU=n +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 +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=y +CONFIG_RCU_BOOST=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE03 b/tools/testing/selftests/rcutorture/configs/TREE03 new file mode 100644 index 000000000000..a47de5be8a04 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE03 @@ -0,0 +1,23 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=y +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_EXACT=n +CONFIG_RCU_NOCB_CPU=n +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_RCU_BOOST=y +CONFIG_RCU_BOOST_PRIO=2 +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE04 b/tools/testing/selftests/rcutorture/configs/TREE04 new file mode 100644 index 000000000000..8d839b86a1d5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE04 @@ -0,0 +1,25 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=n +CONFIG_NO_HZ_FULL=y +CONFIG_NO_HZ_FULL_ALL=y +CONFIG_RCU_FAST_NO_HZ=y +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_EXACT=n +CONFIG_RCU_NOCB_CPU=n +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_RCU_CPU_STALL_VERBOSE=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE04.boot b/tools/testing/selftests/rcutorture/configs/TREE04.boot new file mode 100644 index 000000000000..0fc8a3428938 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE04.boot @@ -0,0 +1 @@ +rcutorture.torture_type=rcu_bh diff --git a/tools/testing/selftests/rcutorture/configs/TREE05 b/tools/testing/selftests/rcutorture/configs/TREE05 new file mode 100644 index 000000000000..b5ba72ea25cb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE05 @@ -0,0 +1,25 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_FAST_NO_HZ=n +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 +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_PROVE_RCU_DELAY=y +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE05.boot b/tools/testing/selftests/rcutorture/configs/TREE05.boot new file mode 100644 index 000000000000..3b42b8b033cd --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE05.boot @@ -0,0 +1 @@ +rcutorture.torture_type=sched diff --git a/tools/testing/selftests/rcutorture/configs/TREE06 b/tools/testing/selftests/rcutorture/configs/TREE06 new file mode 100644 index 000000000000..7c95ab48d29f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE06 @@ -0,0 +1,26 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_FAST_NO_HZ=n +CONFIG_RCU_TRACE=n +CONFIG_HOTPLUG_CPU=n +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 +CONFIG_PROVE_RCU=y +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE07 b/tools/testing/selftests/rcutorture/configs/TREE07 new file mode 100644 index 000000000000..1467404bdec1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE07 @@ -0,0 +1,24 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=16 +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TREE_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=n +CONFIG_NO_HZ_FULL=y +CONFIG_NO_HZ_FULL_ALL=y +CONFIG_NO_HZ_FULL_SYSIDLE=y +CONFIG_RCU_FAST_NO_HZ=n +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_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=y +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE08 b/tools/testing/selftests/rcutorture/configs/TREE08 new file mode 100644 index 000000000000..7d097a61ac2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE08 @@ -0,0 +1,26 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=16 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_FAST_NO_HZ=n +CONFIG_RCU_TRACE=n +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 +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_RCU_BOOST=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TREE09 b/tools/testing/selftests/rcutorture/configs/TREE09 new file mode 100644 index 000000000000..0d1ec0d3dfee --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE09 @@ -0,0 +1,21 @@ +CONFIG_SMP=n +CONFIG_NR_CPUS=1 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_TRACE=n +CONFIG_HOTPLUG_CPU=n +CONFIG_SUSPEND=n +CONFIG_HIBERNATION=n +CONFIG_RCU_NOCB_CPU=n +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_RCU_BOOST=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a b/tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a deleted file mode 100644 index 9dbcde3a517e..000000000000 --- a/tools/testing/selftests/rcutorture/configs/sysidleN.2013.06.19a +++ /dev/null @@ -1,23 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_RCU_CPU_STALL_INFO=y -CONFIG_NO_HZ_PERIODIC=n -CONFIG_NO_HZ_IDLE=n -CONFIG_NO_HZ_FULL=y -CONFIG_NO_HZ_FULL_SYSIDLE=n -CONFIG_RCU_FAST_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=8 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a b/tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a deleted file mode 100644 index d24dd6148ebf..000000000000 --- a/tools/testing/selftests/rcutorture/configs/sysidleY.2013.06.19a +++ /dev/null @@ -1,26 +0,0 @@ -CONFIG_RCU_TRACE=y -CONFIG_RCU_CPU_STALL_INFO=y -CONFIG_NO_HZ_PERIODIC=n -CONFIG_NO_HZ_IDLE=n -CONFIG_NO_HZ_FULL=y -CONFIG_NO_HZ_FULL_SYSIDLE=y -CONFIG_RCU_FAST_NO_HZ=y -CONFIG_SMP=y -CONFIG_RCU_FANOUT=8 -CONFIG_NR_CPUS=8 -CONFIG_RCU_FANOUT_EXACT=n -CONFIG_HOTPLUG_CPU=y -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -#CHECK#CONFIG_TREE_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y - diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-Kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-Kconfig.txt new file mode 100644 index 000000000000..adbb76cffb49 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-Kconfig.txt @@ -0,0 +1,95 @@ +This document gives a brief rationale for the TREE_RCU-related test +cases, a group that includes TREE_PREEMPT_RCU. + + +Kconfig Parameters: + +CONFIG_DEBUG_LOCK_ALLOC -- Do three, covering CONFIG_PROVE_LOCKING & not. +CONFIG_DEBUG_OBJECTS_RCU_HEAD -- Do one. +CONFIG_HOTPLUG_CPU -- Do half. (Every second.) +CONFIG_HZ_PERIODIC -- Do one. +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_RCU_DELAY -- Do one. +CONFIG_RCU_BOOST -- one of TREE_PREEMPT_RCU. +CONFIG_RCU_BOOST_PRIO -- set to 2 for _BOOST testing. +CONFIG_RCU_CPU_STALL_INFO -- do one with and without _VERBOSE. +CONFIG_RCU_CPU_STALL_VERBOSE -- do one with and without _INFO. +CONFIG_RCU_FANOUT -- Cover hierarchy as currently, but overlap with others. +CONFIG_RCU_FANOUT_EXACT -- Do one. +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. +CONFIG_RCU_NOCB_CPU_ALL -- Do one. +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 TREE_PREEMPT_RCU. +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. + + +Kconfig Parameters Ignored: + +CONFIG_64BIT + + Used only to check CONFIG_RCU_FANOUT value, inspection suffices. + +CONFIG_NO_HZ_FULL_SYSIDLE_SMALL + + Defer until Frederic uses this. + +CONFIG_PREEMPT_COUNT +CONFIG_PREEMPT_RCU + + Redundant with CONFIG_PREEMPT, ignore. + +CONFIG_RCU_BOOST_DELAY + + Inspection suffices, ignore. + +CONFIG_RCU_CPU_STALL_TIMEOUT + + Inspection suffices, ignore. + +CONFIG_RCU_STALL_COMMON + + Implied by TREE_RCU and TREE_PREEMPT_RCU. + +CONFIG_RCU_TORTURE_TEST +CONFIG_RCU_TORTURE_TEST_RUNNABLE + + Always used in KVM testing. + +CONFIG_RCU_USER_QS + + Redundant with CONFIG_NO_HZ_FULL. + +CONFIG_TREE_PREEMPT_RCU +CONFIG_TREE_RCU + + These are controlled by CONFIG_PREEMPT. -- cgit v1.2.3 From 0f66f92d11f80d0972b180f0151e629fc0c12cb1 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 30 Sep 2013 13:21:08 -0700 Subject: rcutorture: Refactor TINY_RCU test cases The TINY_RCU test cases were first put in place many years ago, and have been incrementally modified rather than being reworked. This commit therefore completes a long-overdue reworking of the TINY_RCU test cases. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/configs/CFLIST | 4 +-- tools/testing/selftests/rcutorture/configs/NT1-nh | 23 ------------- tools/testing/selftests/rcutorture/configs/NT3-NH | 20 ----------- tools/testing/selftests/rcutorture/configs/PT1-nh | 23 ------------- tools/testing/selftests/rcutorture/configs/PT2-NH | 22 ------------ tools/testing/selftests/rcutorture/configs/TINY01 | 13 +++++++ tools/testing/selftests/rcutorture/configs/TINY02 | 13 +++++++ .../testing/selftests/rcutorture/doc/TINY_RCU.txt | 40 ++++++++++++++++++++++ 8 files changed, 68 insertions(+), 90 deletions(-) delete mode 100644 tools/testing/selftests/rcutorture/configs/NT1-nh delete mode 100644 tools/testing/selftests/rcutorture/configs/NT3-NH delete mode 100644 tools/testing/selftests/rcutorture/configs/PT1-nh delete mode 100644 tools/testing/selftests/rcutorture/configs/PT2-NH create mode 100644 tools/testing/selftests/rcutorture/configs/TINY01 create mode 100644 tools/testing/selftests/rcutorture/configs/TINY02 create mode 100644 tools/testing/selftests/rcutorture/doc/TINY_RCU.txt diff --git a/tools/testing/selftests/rcutorture/configs/CFLIST b/tools/testing/selftests/rcutorture/configs/CFLIST index 884491b25c19..cd3d29cb0a47 100644 --- a/tools/testing/selftests/rcutorture/configs/CFLIST +++ b/tools/testing/selftests/rcutorture/configs/CFLIST @@ -9,5 +9,5 @@ TREE08 TREE09 SRCU-N SRCU-P -NT1-nh -NT3-NH +TINY01 +TINY02 diff --git a/tools/testing/selftests/rcutorture/configs/NT1-nh b/tools/testing/selftests/rcutorture/configs/NT1-nh deleted file mode 100644 index 023f312a931c..000000000000 --- a/tools/testing/selftests/rcutorture/configs/NT1-nh +++ /dev/null @@ -1,23 +0,0 @@ -#CHECK#CONFIG_TINY_RCU=y -CONFIG_RCU_TRACE=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -# -CONFIG_SMP=n -# -CONFIG_HOTPLUG_CPU=n -# -CONFIG_NO_HZ=n -# -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/NT3-NH b/tools/testing/selftests/rcutorture/configs/NT3-NH deleted file mode 100644 index 6fd0235dae73..000000000000 --- a/tools/testing/selftests/rcutorture/configs/NT3-NH +++ /dev/null @@ -1,20 +0,0 @@ -#CHECK#CONFIG_TINY_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -# -CONFIG_SMP=n -# -CONFIG_HOTPLUG_CPU=n -# -CONFIG_NO_HZ=y -# -CONFIG_PREEMPT_NONE=y -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=n -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/PT1-nh b/tools/testing/selftests/rcutorture/configs/PT1-nh deleted file mode 100644 index e3361c3894a1..000000000000 --- a/tools/testing/selftests/rcutorture/configs/PT1-nh +++ /dev/null @@ -1,23 +0,0 @@ -CONFIG_TINY_PREEMPT_RCU=y -CONFIG_RCU_BOOST=y -CONFIG_RCU_BOOST_PRIO=2 -CONFIG_RCU_TRACE=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -# -CONFIG_SMP=n -# -CONFIG_HOTPLUG_CPU=n -# -CONFIG_NO_HZ=n -# -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/PT2-NH b/tools/testing/selftests/rcutorture/configs/PT2-NH deleted file mode 100644 index 64abfc3b4d94..000000000000 --- a/tools/testing/selftests/rcutorture/configs/PT2-NH +++ /dev/null @@ -1,22 +0,0 @@ -CONFIG_TINY_PREEMPT_RCU=y -CONFIG_RCU_TORTURE_TEST=m -CONFIG_MODULE_UNLOAD=y -CONFIG_SUSPEND=n -CONFIG_HIBERNATION=n -# -CONFIG_SMP=n -# -CONFIG_HOTPLUG_CPU=n -# -CONFIG_NO_HZ=y -# -CONFIG_PREEMPT_NONE=n -CONFIG_PREEMPT_VOLUNTARY=n -CONFIG_PREEMPT=y -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_PRINTK_TIME=y - diff --git a/tools/testing/selftests/rcutorture/configs/TINY01 b/tools/testing/selftests/rcutorture/configs/TINY01 new file mode 100644 index 000000000000..0c2823f21712 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TINY01 @@ -0,0 +1,13 @@ +CONFIG_SMP=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TINY_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_TRACE=n +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PREEMPT_COUNT=n +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/TINY02 b/tools/testing/selftests/rcutorture/configs/TINY02 new file mode 100644 index 000000000000..e5072d7528b6 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TINY02 @@ -0,0 +1,13 @@ +CONFIG_SMP=n +CONFIG_PREEMPT_NONE=y +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=n +#CHECK#CONFIG_TINY_RCU=y +CONFIG_HZ_PERIODIC=y +CONFIG_NO_HZ_IDLE=n +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_TRACE=y +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PREEMPT_COUNT=y +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/doc/TINY_RCU.txt b/tools/testing/selftests/rcutorture/doc/TINY_RCU.txt new file mode 100644 index 000000000000..28db67b54e55 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/TINY_RCU.txt @@ -0,0 +1,40 @@ +This document gives a brief rationale for the TINY_RCU test cases. + + +Kconfig Parameters: + +CONFIG_DEBUG_LOCK_ALLOC -- Do all three and none of the three. +CONFIG_PREEMPT_COUNT +CONFIG_RCU_TRACE + +The theory here is that randconfig testing will hit the other six possible +combinations of these parameters. + + +Kconfig Parameters Ignored: + +CONFIG_DEBUG_OBJECTS_RCU_HEAD +CONFIG_PROVE_RCU + + In common code tested by TREE_RCU test cases. + +CONFIG_NO_HZ_FULL_SYSIDLE +CONFIG_RCU_NOCB_CPU +CONFIG_RCU_USER_QS + + Meaningless for TINY_RCU. + +CONFIG_RCU_STALL_COMMON +CONFIG_RCU_TORTURE_TEST + + Redundant with CONFIG_RCU_TRACE. + +CONFIG_HOTPLUG_CPU +CONFIG_PREEMPT +CONFIG_PREEMPT_RCU +CONFIG_SMP +CONFIG_TINY_RCU +CONFIG_TREE_PREEMPT_RCU +CONFIG_TREE_RCU + + All forced by CONFIG_TINY_RCU. -- cgit v1.2.3 From 330a76f15651a715a54bc2022586a7be151c9963 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 30 Sep 2013 14:49:43 -0700 Subject: rcutorture: Make test output less chatty This commit drops no-longer-needed diagnostics from the output. Some of them are retained in logfiles, in case they are ever needed. Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../testing/selftests/rcutorture/bin/configinit.sh | 2 -- .../selftests/rcutorture/bin/kvm-test-1-rcu.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm.sh | 25 +++++++++++++--------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh index 1f09d599e9d9..926fbd30bcbd 100755 --- a/tools/testing/selftests/rcutorture/bin/configinit.sh +++ b/tools/testing/selftests/rcutorture/bin/configinit.sh @@ -14,8 +14,6 @@ # for example, "O=/tmp/foo". If this argument is omitted, the .config # file will be generated directly in the current directory. -echo configinit.sh $* - T=/tmp/configinit.sh.$$ trap 'rm -rf $T' 0 mkdir $T diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 618aa4d766d3..5526550a5d56 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -62,7 +62,7 @@ then fi cp $config_template $resdir/ConfigFragment echo ' ---' `date`: Starting build -echo ' ---' Kconfig fragment at: $config_template +echo ' ---' Kconfig fragment at: $config_template >> $resdir/log cat << '___EOF___' >> $T CONFIG_RCU_TORTURE_TEST=y ___EOF___ diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 92f726b01044..bf6d68e96e94 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -28,6 +28,7 @@ # Authors: Paul E. McKenney scriptname=$0 +args="$*" dur=30 KVM=`pwd`/tools/testing/selftests/rcutorture; export KVM @@ -73,7 +74,6 @@ checkarg () { while test $# -gt 0 do - echo ":$1:" case "$1" in --builddir) checkarg --builddir "(absolute pathname)" "$#" "$2" '^/' error @@ -133,11 +133,6 @@ do shift done -echo "builddir=$builddir" -echo "dur=$dur" -echo "KVM=$KVM" -echo "resdir=$resdir" - PATH=${KVM}/bin:$PATH; export PATH CONFIGFRAG=${KVM}/configs; export CONFIGFRAG KVPATH=${CONFIGFRAG}/$kversion; export KVPATH @@ -150,12 +145,19 @@ fi if test -z "$resdir" then resdir=$KVM/res - mkdir $resdir || : + if ! test -e $resdir + then + mkdir $resdir || : + fi else - mkdir -p "$resdir" || : + if ! test -e $resdir + then + mkdir -p "$resdir" || : + fi fi mkdir $resdir/$ds -echo Datestamp: $ds +touch $resdir/$ds/log +echo $scriptname $args >> $resdir/$ds/log pwd > $resdir/$ds/testid.txt if test -d .git @@ -164,7 +166,10 @@ then git rev-parse HEAD >> $resdir/$ds/testid.txt fi builddir=$KVM/b1 -mkdir $builddir || : +if ! test -e $builddir +then + mkdir $builddir || : +fi for CF in $configs do -- cgit v1.2.3 From 50d48a1d154ef9ece016512817dbbd33c598f162 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 30 Sep 2013 15:16:14 -0700 Subject: rcutorture: Eliminate duplicate .config-check code The commit uses configcheck.sh from within configinit.sh, replacing the imperfect inline expansion that was there before. Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../testing/selftests/rcutorture/bin/configinit.sh | 27 +--------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh index 926fbd30bcbd..939c16cd03ab 100755 --- a/tools/testing/selftests/rcutorture/bin/configinit.sh +++ b/tools/testing/selftests/rcutorture/bin/configinit.sh @@ -51,31 +51,6 @@ cp $builddir/.config $builddir/.config.new yes '' | make $buildloc oldconfig > $builddir/Make.modconfig.out 2>&1 # verify new config matches specification. +configcheck.sh $builddir/.config $c -sed -e 's/"//g' < $c > $T/c -sed -e 's/"//g' < $builddir/.config > $T/.config -sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' < $c | -awk ' - { - print "if grep -q \"" $0 "\" < '"$T/.config"'"; - print "then"; - print "\t:"; - print "else"; - if ($1 == "#") { - print "\tif grep -q \"" $2 "\" < '"$T/.config"'"; - print "\tthen"; - print "\t\techo \":" $2 ": improperly set\""; - print "\telse"; - print "\t\t:"; - print "\tfi"; - } else { - print "\techo \":" $0 ": improperly set\""; - } - print "fi"; - }' | sh > $T/diagnostics -if test -s $T/diagnostics -then - cat $T/diagnostics - exit 1 -fi exit 0 -- cgit v1.2.3 From 4f8a031279f5c17ad76b6833c64b8f86a450ebda Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 30 Sep 2013 17:17:57 -0700 Subject: rcutorture: Abstract qemu-flavor identification The task of working out which flavor of qemu to use gets more complex as more types of CPUs are supported. Adding Power makes three in addition to 32-bit and 64-bit x86, so it is time to pull this out into a function. This commit therefore creates an identify_qemu function and also adds a --qemu-cmd command-line argument for the inevitable case where the identify_qemu cannot figure it out. Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../testing/selftests/rcutorture/bin/functions.sh | 27 ++++++++++++++++++++++ .../selftests/rcutorture/bin/kvm-test-1-rcu.sh | 9 +++----- tools/testing/selftests/rcutorture/bin/kvm.sh | 6 +++++ 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index 8f912419ed7f..c974414ef7a5 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -51,3 +51,30 @@ configfrag_hotplug_cpu () { fi grep -q '^CONFIG_HOTPLUG_CPU=y$' "$1" } + +# identify_qemu builddir +# +# Returns our best guess as to which qemu command is appropriate for +# the kernel at hand. Override with the RCU_QEMU_CMD environment variable. +identify_qemu () { + local u="`file "$1"`" + if test -n "$RCU_QEMU_CMD" + then + echo $RCU_QEMU_CMD + elif echo $u | grep -q x86-64 + then + echo qemu-system-x86_64 + elif echo $u | grep -q "Intel 80386" + then + echo qemu-system-i386 + elif uname -a | grep -q ppc64 + then + echo qemu-system-ppc64 + else + echo Cannot figure out what qemu command to use! 1>&2 + # Usually this will be one of /usr/bin/qemu-system-* + # Use RCU_QEMU_CMD environment variable or appropriate + # argument to top-level script. + exit 1 + fi +} diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 5526550a5d56..ddf3bd6eaf19 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -109,12 +109,9 @@ boot_args=$6 cd $KVM kstarttime=`awk 'BEGIN { print systime() }' < /dev/null` echo ' ---' `date`: Starting kernel -if file linux-2.6/*.o | grep -q 64-bit -then - QEMU=qemu-system-x86_64 -else - QEMU=qemu-system-i386 -fi + +# Determine the appropriate flavor of qemu command. +QEMU="`identify_qemu $builddir/vmlinux.o`" # Generate -smp qemu argument. cpu_count=`configNR_CPUS.sh $config_template` diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index bf6d68e96e94..89164c245ca1 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -45,6 +45,7 @@ usage () { echo " --datestamp string" echo " --duration minutes" echo " --kversion vN.NN" + echo " --qemu-cmd qemu-system-..." echo " --rcu-kvm absolute-pathname" echo " --results absolute-pathname" echo " --relbuilddir relative-pathname" @@ -101,6 +102,11 @@ do kversion=$2 shift ;; + --qemu-cmd) + checkarg --qemu-cmd "(qemu-system-...)" $# "$2" 'qemu-system-' '^--' + RCU_QEMU_CMD="$2"; export RCU_QEMU_CMD + shift + ;; --rcu-kvm) checkarg --rcu-kvm "(absolute pathname)" "$#" "$2" '^/' error KVM=$2; export KVM -- cgit v1.2.3 From 14db63f575db5e27a733f873e17930f3071076ef Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 1 Oct 2013 08:48:18 -0700 Subject: rcutorture: Remove decorative qemu argument The qemu -name argument doesn't seem to be useful in this environment, so this commit removes it. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index ddf3bd6eaf19..5e2e79b5eaba 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -137,7 +137,7 @@ boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" # Pull in Kconfig-fragment boot parameters boot_args="`configfrag_boot_params "$boot_args" "$config_template"`" -echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd +echo $QEMU -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & qemu_pid=$! commandcompleted=0 -- cgit v1.2.3 From 2bcdf4e31ae4e215b1e61831d9defa3632cb7bd3 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 1 Oct 2013 10:14:09 -0700 Subject: rcutorture: Eliminate --rcu-kvm argument The --rcu-kvm argument was intended to allow the scripts to live in an alternate location. Unfortunately, this prevents the kvm.sh script from using common functions until after it finished parsing arguments, because it doesn't know where to find them until then. However, "cp -a" and "ln -s" work pretty well, so lack of an --rcu-kvm argument can be easily worked around. This commit therefore removes this argument. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 89164c245ca1..2af549491f23 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -46,7 +46,6 @@ usage () { echo " --duration minutes" echo " --kversion vN.NN" echo " --qemu-cmd qemu-system-..." - echo " --rcu-kvm absolute-pathname" echo " --results absolute-pathname" echo " --relbuilddir relative-pathname" exit 1 @@ -107,19 +106,6 @@ do RCU_QEMU_CMD="$2"; export RCU_QEMU_CMD shift ;; - --rcu-kvm) - checkarg --rcu-kvm "(absolute pathname)" "$#" "$2" '^/' error - KVM=$2; export KVM - if -z "$gotbuilddir" - then - builddir=${KVM}/b1 - fi - if -n "$gotrelbuilddir" - then - builddir=${KVM}/${relbuilddir} - fi - shift - ;; --relbuilddir) checkarg --relbuilddir "(relative pathname)" "$#" "$2" '^[^/]*$' '^--' relbuilddir=$2 @@ -133,6 +119,7 @@ do shift ;; *) + echo Unknown argument $1 usage ;; esac -- cgit v1.2.3 From 315c540d46f8f11fe2a84e627d9473e90441ae96 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 4 Oct 2013 13:15:55 -0700 Subject: rcutorture: Refactor to enable non-x86 architectures This commit expands the checks for what architecture is running to generate additional qemu-system- commands, then uses the resulting qemu-system- command name to choose different qemu arguments as needed for different architectures. Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../testing/selftests/rcutorture/bin/functions.sh | 78 ++++++++++++++++++++++ .../selftests/rcutorture/bin/kvm-test-1-rcu.sh | 27 ++++---- tools/testing/selftests/rcutorture/bin/kvm.sh | 10 +++ 3 files changed, 102 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index c974414ef7a5..d0d19ebd2a94 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -78,3 +78,81 @@ identify_qemu () { exit 1 fi } + +# identify_qemu_append qemu-cmd +# +# Output arguments for the qemu "-append" string based on CPU type +# and the RCU_QEMU_INTERACTIVE environment variable. +identify_qemu_append () { + case "$1" in + qemu-system-x86_64|qemu-system-i386) + echo noapic selinux=0 initcall_debug debug + ;; + esac + if test -n "$RCU_QEMU_INTERACTIVE" + then + echo root=/dev/sda + else + echo console=ttyS0 + fi +} + +# identify_qemu_args qemu-cmd serial-file +# +# Output arguments for qemu arguments based on the RCU_QEMU_MAC +# and RCU_QEMU_INTERACTIVE environment variables. +identify_qemu_args () { + case "$1" in + qemu-system-x86_64|qemu-system-i386) + ;; + qemu-system-ppc64) + echo -enable-kvm -M pseries -cpu POWER7 -nodefaults + echo -device spapr-vscsi + if test -n "$RCU_QEMU_INTERACTIVE" -a -n "$RCU_QEMU_MAC" + then + echo -device spapr-vlan,netdev=net0,mac=$RCU_QEMU_MAC + echo -netdev bridge,br=br0,id=net0 + elif test -n "$RCU_QEMU_INTERACTIVE" + then + echo -net nic -net user + fi + ;; + esac + if test -n "$RCU_QEMU_INTERACTIVE" + then + echo -monitor stdio -serial pty -S + else + echo -serial file:$2 + fi +} + +# identify_qemu_vcpus +# +# Returns the number of virtual CPUs available to the aggregate of the +# guest OSes. +identify_qemu_vcpus () { + lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' +} + +# specify_qemu_cpus qemu-cmd qemu-args #cpus +# +# Appends a string containing "-smp XXX" to qemu-args, unless the incoming +# qemu-args already contains "-smp". +specify_qemu_cpus () { + local nt; + + if echo $2 | grep -q -e -smp + then + echo $2 + else + case "$1" in + qemu-system-x86_64|qemu-system-i386) + echo $2 -smp $3 + ;; + qemu-system-ppc64) + nt="`lscpu | grep '^NUMA node0' | sed -e 's/^[^,]*,\([0-9]*\),.*$/\1/'`" + echo $2 -smp cores=`expr \( $3 + $nt - 1 \) / $nt`,threads=$nt + ;; + esac + fi +} diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 5e2e79b5eaba..9fd546ccb075 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -115,20 +115,21 @@ QEMU="`identify_qemu $builddir/vmlinux.o`" # Generate -smp qemu argument. cpu_count=`configNR_CPUS.sh $config_template` -ncpus=`grep '^processor' /proc/cpuinfo | wc -l` -if test $cpu_count -gt $ncpus +vcpus=`identify_qemu_vcpus` +if test $cpu_count -gt $vcpus then - echo CPU count limited from $cpu_count to $ncpus + echo CPU count limited from $cpu_count to $vcpus touch $resdir/Warnings - echo CPU count limited from $cpu_count to $ncpus >> $resdir/Warnings - cpu_count=$ncpus -fi -if echo $qemu_args | grep -q -e -smp -then - echo CPU count specified by caller -else - qemu_args="$qemu_args -smp $cpu_count" + echo CPU count limited from $cpu_count to $vcpus >> $resdir/Warnings + cpu_count=$vcpus fi +qemu_args="`specify_qemu_cpus "$QEMU" "$qemu_args" "$cpu_count"`" + +# Generate architecture-specific and interaction-specific qemu arguments +qemu_args="$qemu_args `identify_qemu_args "$QEMU" "$builddir/console.log"`" + +# Generate qemu -append arguments +qemu_append="`identify_qemu_append "$QEMU"`" # Generate CPU-hotplug boot parameters boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" @@ -137,8 +138,8 @@ boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" # Pull in Kconfig-fragment boot parameters boot_args="`configfrag_boot_params "$boot_args" "$config_template"`" -echo $QEMU -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd -$QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & +echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd +$QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & qemu_pid=$! commandcompleted=0 echo Monitoring qemu job at pid $qemu_pid diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 2af549491f23..979c34134634 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -44,7 +44,9 @@ usage () { echo " --configs \"config-file list\"" echo " --datestamp string" echo " --duration minutes" + echo " --interactive" echo " --kversion vN.NN" + echo " --mac nn:nn:nn:nn:nn:nn" echo " --qemu-cmd qemu-system-..." echo " --results absolute-pathname" echo " --relbuilddir relative-pathname" @@ -96,11 +98,19 @@ do dur=$2 shift ;; + --interactive) + RCU_QEMU_INTERACTIVE=1; export RCU_QEMU_INTERACTIVE + ;; --kversion) checkarg --kversion "(kernel version)" $# "$2" '^v[0-9.]*$' error kversion=$2 shift ;; + --mac) + checkarg --mac "(MAC address)" $# "$2" '^\([0-9a-fA-F]\{2\}:\)\{5\}[0-9a-fA-F]\{2\}$' error + RCU_QEMU_MAC=$2; export RCU_QEMU_MAC + shift + ;; --qemu-cmd) checkarg --qemu-cmd "(qemu-system-...)" $# "$2" 'qemu-system-' '^--' RCU_QEMU_CMD="$2"; export RCU_QEMU_CMD -- cgit v1.2.3 From be70a73a1ab46860533dfa933d7b188ca053f0ec Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 9 Oct 2013 11:02:00 -0700 Subject: rcutorture: Allow Kconfig-related boot parameters to override As it stands, the default kernel boot parameters generated from the Kconfig fragment will override any supplied with the .boot file that can optionally accompany a Kconfig fragment. Rearrange ordering to permit the specific .boot arguments to override those generated by analyzing the Kconfig fragment. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 9fd546ccb075..93342f7ce6d5 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -131,15 +131,17 @@ qemu_args="$qemu_args `identify_qemu_args "$QEMU" "$builddir/console.log"`" # Generate qemu -append arguments qemu_append="`identify_qemu_append "$QEMU"`" +# Pull in Kconfig-fragment boot parameters +boot_args="`configfrag_boot_params "$boot_args" "$config_template"`" # Generate CPU-hotplug boot parameters boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" # Generate rcu_barrier() boot parameter boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" -# Pull in Kconfig-fragment boot parameters -boot_args="`configfrag_boot_params "$boot_args" "$config_template"`" +# Pull in standard rcutorture boot arguments +boot_args="$boot_args rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1" -echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd -$QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & +echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd +$QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append $boot_args" & qemu_pid=$! commandcompleted=0 echo Monitoring qemu job at pid $qemu_pid -- cgit v1.2.3 From 06d9d1b2e2e58347af37f00856156a550522b2cb Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 9 Oct 2013 15:02:54 -0700 Subject: rcutorture: Eliminate configdir argument from kvm-recheck.sh script Don't grab the configuration fragment from the configs directory because it might well have been changed since the test was run. Instead, use the ConfigFragment file that was placed in the results directory. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh index 0876af75b66b..26e82b5d67f8 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh @@ -4,7 +4,7 @@ # check the build and console output for errors. Given a directory # containing results directories, this recursively checks them all. # -# Usage: sh kvm-recheck.sh configdir resdir ... +# Usage: sh kvm-recheck.sh resdir ... # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,8 +25,6 @@ # Authors: Paul E. McKenney PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH -configdir=${1} -shift for rd in "$@" do dirs=`find $rd -name Make.defconfig.out -print | sort | sed -e 's,/[^/]*$,,' | sort -u` @@ -34,7 +32,7 @@ do do configfile=`echo $i | sed -e 's/^.*\///'` echo $i - configcheck.sh $i/.config $configdir/$configfile + configcheck.sh $i/.config $i/ConfigFragment parse-build.sh $i/Make.out $configfile parse-rcutorture.sh $i/console.log $configfile parse-console.sh $i/console.log $configfile -- cgit v1.2.3 From 1127481392c8b95ad5066b6be99b3482522d4c89 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Thu, 10 Oct 2013 14:52:07 -0700 Subject: rcutorture: Add --buildonly dry-run capability This commit adds --buildonly, which does the builds specified by the --configs argument, but does not boot or test the resulting kernels. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | 5 +++++ tools/testing/selftests/rcutorture/bin/kvm.sh | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 93342f7ce6d5..3df1581e78ae 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -141,6 +141,11 @@ boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" boot_args="$boot_args rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1" echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd +if test -n "$RCU_BUILDONLY" +then + echo Build-only run specified, boot/test omitted. + exit 0 +fi $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append $boot_args" & qemu_pid=$! commandcompleted=0 diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 979c34134634..6c67d0ca8c9a 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -41,6 +41,7 @@ kversion="" usage () { echo "Usage: $scriptname optional arguments:" echo " --builddir absolute-pathname" + echo " --buildonly" echo " --configs \"config-file list\"" echo " --datestamp string" echo " --duration minutes" @@ -83,6 +84,9 @@ do gotbuilddir=1 shift ;; + --buildonly) + RCU_BUILDONLY=1; export RCU_BUILDONLY + ;; --configs) checkarg --configs "(list of config files)" "$#" "$2" '^[^/]*$' '^--' configs="$2" -- cgit v1.2.3 From 7dca927328fce6f6854486c4c2355ffbe1469240 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 14 Oct 2013 08:19:39 -0700 Subject: rcutorture: Add --bootargs argument to specify additional boot arguments This commit allows easy specification of trace_event lists, among other things. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 6c67d0ca8c9a..2fb91d4f7996 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -40,6 +40,7 @@ kversion="" usage () { echo "Usage: $scriptname optional arguments:" + echo " --bootargs kernel-boot-arguments" echo " --builddir absolute-pathname" echo " --buildonly" echo " --configs \"config-file list\"" @@ -78,6 +79,11 @@ checkarg () { while test $# -gt 0 do case "$1" in + --bootargs) + checkarg --bootargs "(list of kernel boot arguments)" "$#" "$2" '.*' '^--' + RCU_BOOTARGS="$2" + shift + ;; --builddir) checkarg --builddir "(absolute pathname)" "$#" "$2" '^/' error builddir=$2 @@ -183,6 +189,6 @@ do rd=$resdir/$ds/$CF mkdir $rd || : echo Results directory: $rd - kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1" + kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" done # Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task -- cgit v1.2.3 From e9ce640001c681a1ec01a996dfae2f8fa5d1cfba Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 15 Oct 2013 09:22:48 -0700 Subject: rcutorture: Add --qemu-args argument to kvm.sh This commits adds the --qemu-args argument to kvm.sh that is required to pass boot devices down through to qemu. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 2fb91d4f7996..7d6ca337d1fd 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -49,6 +49,7 @@ usage () { echo " --interactive" echo " --kversion vN.NN" echo " --mac nn:nn:nn:nn:nn:nn" + echo " --qemu-args qemu-system-..." echo " --qemu-cmd qemu-system-..." echo " --results absolute-pathname" echo " --relbuilddir relative-pathname" @@ -85,7 +86,7 @@ do shift ;; --builddir) - checkarg --builddir "(absolute pathname)" "$#" "$2" '^/' error + checkarg --builddir "(absolute pathname)" "$#" "$2" '^/' '^error' builddir=$2 gotbuilddir=1 shift @@ -104,7 +105,7 @@ do shift ;; --duration) - checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' error + checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' '^error' dur=$2 shift ;; @@ -112,7 +113,7 @@ do RCU_QEMU_INTERACTIVE=1; export RCU_QEMU_INTERACTIVE ;; --kversion) - checkarg --kversion "(kernel version)" $# "$2" '^v[0-9.]*$' error + checkarg --kversion "(kernel version)" $# "$2" '^v[0-9.]*$' '^error' kversion=$2 shift ;; @@ -121,6 +122,11 @@ do RCU_QEMU_MAC=$2; export RCU_QEMU_MAC shift ;; + --qemu-args) + checkarg --qemu-args "-qemu args" $# "$2" '^-' '^error' + RCU_QEMU_ARG="$2" + shift + ;; --qemu-cmd) checkarg --qemu-cmd "(qemu-system-...)" $# "$2" 'qemu-system-' '^--' RCU_QEMU_CMD="$2"; export RCU_QEMU_CMD @@ -134,7 +140,7 @@ do shift ;; --results) - checkarg --results "(absolute pathname)" "$#" "$2" '^/' error + checkarg --results "(absolute pathname)" "$#" "$2" '^/' '^error' resdir=$2 shift ;; @@ -189,6 +195,6 @@ do rd=$resdir/$ds/$CF mkdir $rd || : echo Results directory: $rd - kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" + kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" done # Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task -- cgit v1.2.3 From 73931b5ee92d013b7b7d62927cca2a8dfdf3a9d3 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 15 Oct 2013 10:42:25 -0700 Subject: rcutorture: Add --no-initrd argument to kvm.sh This commit adds the --no-initrd argument to kvm.sh, which permits initrd to be contained in a root partition specified by the --bootargs argument. Without --no-initrd, the kernel build expects an initrd directory in the same rcutorture directory that contains bin and configs. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm-build.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-build.sh b/tools/testing/selftests/rcutorture/bin/kvm-build.sh index 07bbeccb5a28..618ef2c543fd 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-build.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-build.sh @@ -47,7 +47,7 @@ mkdir $T cat ${config_template} | grep -v CONFIG_RCU_TORTURE_TEST > $T/config cat << ___EOF___ >> $T/config -CONFIG_INITRAMFS_SOURCE="$KVM/initrd" +CONFIG_INITRAMFS_SOURCE="$RCU_INITRD" CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_CONSOLE=y ___EOF___ diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 7d6ca337d1fd..a833160dcdc3 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -31,8 +31,9 @@ scriptname=$0 args="$*" dur=30 -KVM=`pwd`/tools/testing/selftests/rcutorture; export KVM -builddir=${KVM}/b1 +KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM +builddir="${KVM}/b1" +RCU_INITRD="$KVM/initrd"; export RCU_INITRD resdir="" configs="" ds=`date +%Y.%m.%d-%H:%M:%S` @@ -49,6 +50,7 @@ usage () { echo " --interactive" echo " --kversion vN.NN" echo " --mac nn:nn:nn:nn:nn:nn" + echo " --no-initrd" echo " --qemu-args qemu-system-..." echo " --qemu-cmd qemu-system-..." echo " --results absolute-pathname" @@ -122,6 +124,9 @@ do RCU_QEMU_MAC=$2; export RCU_QEMU_MAC shift ;; + --no-initrd) + RCU_INITRD=""; export RCU_INITRD + ;; --qemu-args) checkarg --qemu-args "-qemu args" $# "$2" '^-' '^error' RCU_QEMU_ARG="$2" -- cgit v1.2.3 From 74878fb6368eb254d5bedd8f21a165562222919f Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 15 Oct 2013 11:51:23 -0700 Subject: rcutorture: Add --kmake-arg argument to kvm.sh This commit adds the --kmake-arg to kvm.sh, which allows passing in things like "V=1" to see the build commands, as well as enabling the CROSS_COMPILE= make macro used for cross-building. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm-build.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-build.sh b/tools/testing/selftests/rcutorture/bin/kvm-build.sh index 618ef2c543fd..8c4aa7d63394 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-build.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-build.sh @@ -60,7 +60,7 @@ then exit 2 fi ncpus=`cpus2use.sh` -make O=$builddir -j$ncpus > $builddir/Make.out 2>&1 +make O=$builddir -j$ncpus $RCU_KMAKE_ARG > $builddir/Make.out 2>&1 retval=$? if test $retval -ne 0 || grep "rcu[^/]*": < $builddir/Make.out | egrep -q "Stop|Error|error:|warning:" || egrep -q "Stop|Error|error:" < $builddir/Make.out then diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index a833160dcdc3..69b6523bb854 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -34,6 +34,7 @@ dur=30 KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM builddir="${KVM}/b1" RCU_INITRD="$KVM/initrd"; export RCU_INITRD +RCU_KMAKE_ARG=""; export RCU_KMAKE_ARG resdir="" configs="" ds=`date +%Y.%m.%d-%H:%M:%S` @@ -48,6 +49,7 @@ usage () { echo " --datestamp string" echo " --duration minutes" echo " --interactive" + echo " --kmake-arg kernel-make-arguments" echo " --kversion vN.NN" echo " --mac nn:nn:nn:nn:nn:nn" echo " --no-initrd" @@ -114,6 +116,11 @@ do --interactive) RCU_QEMU_INTERACTIVE=1; export RCU_QEMU_INTERACTIVE ;; + --kmake-arg) + checkarg --kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$' + RCU_KMAKE_ARG="$2"; export RCU_KMAKE_ARG + shift + ;; --kversion) checkarg --kversion "(kernel version)" $# "$2" '^v[0-9.]*$' '^error' kversion=$2 -- cgit v1.2.3 From 0ef42bbe541ab0e8fc0238a67bf80b8f19c1712f Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 15 Oct 2013 12:08:45 -0700 Subject: rcutorture: Add tracing-enabled version of TREE08 The TREE08 Kconfig fragment does not enable tracing, which is appropriate for its test case. However, this can be inconvenient in cases where TREE08 locates RCU bugs. This commit therefore adds a TREE08-T that differs from TREE08 only in enabling CONFIG_RCU_TRACE. Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../testing/selftests/rcutorture/configs/TREE08-T | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tools/testing/selftests/rcutorture/configs/TREE08-T diff --git a/tools/testing/selftests/rcutorture/configs/TREE08-T b/tools/testing/selftests/rcutorture/configs/TREE08-T new file mode 100644 index 000000000000..442c4e450ab3 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE08-T @@ -0,0 +1,26 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=16 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_TREE_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=n +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_FAST_NO_HZ=n +CONFIG_RCU_TRACE=y +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 +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_PROVE_RCU_DELAY=n +CONFIG_RCU_CPU_STALL_INFO=n +CONFIG_RCU_CPU_STALL_VERBOSE=n +CONFIG_RCU_BOOST=n +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_PRINTK_TIME=y -- cgit v1.2.3 From 782ab4cd2eeb6a680dce8ff76d9ae4edeefe415c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 15 Oct 2013 12:11:24 -0700 Subject: rcutorture: Update comment in kvm.sh listing typical RCU trace events Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 69b6523bb854..02ac41e6d10e 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -209,4 +209,4 @@ do echo Results directory: $rd kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" done -# Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task +# Tracing: trace_event=rcu:rcu_grace_period,rcu:rcu_future_grace_period,rcu:rcu_grace_period_init,rcu:rcu_nocb_wake,rcu:rcu_preempt_task,rcu:rcu_unlock_preempted_task,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_kfree_callback,rcu:rcu_batch_start,rcu:rcu_invoke_callback,rcu:rcu_invoke_kfree_callback,rcu:rcu_batch_end,rcu:rcu_torture_read,rcu:rcu_barrier -- cgit v1.2.3 From e1362651f713e359dd76f0df74bce393a9372316 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 15 Oct 2013 12:22:32 -0700 Subject: rcutorture: Test summary at end of run with less chattiness The commit causes kvm.sh to invoke kvm-recheck.sh at the end of each run, and causes kvm-recheck.sh to print only the name of the test, not the full path to the corresponding Kconfig file. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh index 26e82b5d67f8..874cd32d0486 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh @@ -31,7 +31,7 @@ do for i in $dirs do configfile=`echo $i | sed -e 's/^.*\///'` - echo $i + echo $configfile configcheck.sh $i/.config $i/ConfigFragment parse-build.sh $i/Make.out $configfile parse-rcutorture.sh $i/console.log $configfile diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 02ac41e6d10e..b8d278904dee 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -210,3 +210,6 @@ do kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" done # Tracing: trace_event=rcu:rcu_grace_period,rcu:rcu_future_grace_period,rcu:rcu_grace_period_init,rcu:rcu_nocb_wake,rcu:rcu_preempt_task,rcu:rcu_unlock_preempted_task,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_kfree_callback,rcu:rcu_batch_start,rcu:rcu_invoke_callback,rcu:rcu_invoke_kfree_callback,rcu:rcu_batch_end,rcu:rcu_torture_read,rcu:rcu_barrier + +echo " --- `date` Test summary:" +kvm-recheck.sh $resdir/$ds -- cgit v1.2.3 From f43f8f73510c1013fe9449d7732e8f73a75b6fde Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sat, 19 Oct 2013 06:28:21 -0700 Subject: rcutorture: Record results from repeated runs of the same test scenario Repeatedly running a given test, for example, by repeating the name as in "--configs "TREE08 TREE08 TREE08" records the results only of the last run of this test. This is because the earlier results are overwritten by the later results. This commit therefore checks for earlier results, using numbered file extensions to distinguish multiple runs. The earlier example would therefore create directories TREE01, TREE01.2, and TREE01.3. Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index b8d278904dee..0783ec9c583e 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -204,8 +204,22 @@ fi for CF in $configs do + # Running TREE01 multiple times creates TREE01, TREE01.2, TREE01.3, ... rd=$resdir/$ds/$CF - mkdir $rd || : + if test -d "${rd}" + then + n="`ls -d "${rd}"* | grep '\.[0-9]\+$' | + sed -e 's/^.*\.\([0-9]\+\)/\1/' | + sort -k1n | tail -1`" + if test -z "$n" + then + rd="${rd}.2" + else + n="`expr $n + 1`" + rd="${rd}.${n}" + fi + fi + mkdir "${rd}" echo Results directory: $rd kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" done -- cgit v1.2.3 From 6d40cc0cb4311d0c5aa4a106cc86a3d45a9ad86c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 28 Oct 2013 06:34:22 -0700 Subject: rcutorture: Flag errors and warnings with color coding The output of the rcutorture scripts often requires interpretation, so this commit simplifies this interpretation by tagging messages as BUGs (colored red) or WARNINGs (colored yellow). Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/functions.sh | 16 ++++++++++++++++ .../testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | 5 ++--- tools/testing/selftests/rcutorture/bin/parse-build.sh | 18 ++++++++++++++---- .../testing/selftests/rcutorture/bin/parse-console.sh | 4 +++- .../selftests/rcutorture/bin/parse-rcutorture.sh | 10 ++++++---- 5 files changed, 41 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index d0d19ebd2a94..963b6f04d4ef 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -134,6 +134,22 @@ identify_qemu_vcpus () { lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' } +# print_bug +# +# Prints "BUG: " in red followed by remaining arguments +print_bug () { + printf '\033[031mBUG: \033[m' + echo $* +} + +# print_warning +# +# Prints "WARNING: " in yellow followed by remaining arguments +print_warning () { + printf '\033[033mWARNING: \033[m' + echo $* +} + # specify_qemu_cpus qemu-cmd qemu-args #cpus # # Appends a string containing "-smp XXX" to qemu-args, unless the incoming diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 3df1581e78ae..46f97d33e1ba 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -188,6 +188,5 @@ then fi cp $builddir/console.log $resdir -parse-rcutorture.sh $resdir/console.log $title >> $resdir/Warnings 2>&1 -parse-console.sh $resdir/console.log $title >> $resdir/Warnings 2>&1 -cat $resdir/Warnings +parse-rcutorture.sh $resdir/console.log $title +parse-console.sh $resdir/console.log $title diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh index 2e0e9f7ebbb0..9da2c7ba3fce 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-build.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh @@ -30,18 +30,28 @@ T=$1 title=$2 +. functions.sh + if grep -q CC < $T then : else - echo $title no build + print_bug $title no build exit 1 fi -if egrep -q "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T +if grep -q "error:" < $T +then + print_bug $title build errors: + grep "error:" < $T + exit 2 +fi +exit 0 + +if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T then - echo $title build errors: - egrep "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T + print_warning $title build errors: + egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T exit 2 fi exit 0 diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh index bc1496fa1263..8f4be78f06b6 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-console.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh @@ -31,9 +31,11 @@ trap 'rm -f $T' 0 file="$1" title="$2" +. functions.sh + egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T if test -s $T then - echo Assertion failure in $file $title + print_warning Assertion failure in $file $title cat $T fi diff --git a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh index 37368a046a9f..ac2f75a83225 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh @@ -34,6 +34,8 @@ title="$2" trap 'rm -f $T.seq' 0 +. functions.sh + # check for presence of rcutorture.txt file if test -f "$file" -a -r "$file" @@ -49,7 +51,7 @@ fi if grep -q FAILURE $file || grep -q -e '-torture.*!!!' $file then nerrs=`grep --binary-files=text '!!!' $file | tail -1 | awk '{for (i=NF-8;i<=NF;i++) sum+=$i; } END {print sum}'` - echo $title FAILURE, $nerrs instances + print_bug $title FAILURE, $nerrs instances echo " " $url exit fi @@ -84,21 +86,21 @@ if grep -q SUCCESS $file then if test -s $T.seq then - echo WARNING $title `cat $T.seq` + print_warning $title $title `cat $T.seq` echo " " $file exit 2 fi else if grep -q RCU_HOTPLUG $file then - echo WARNING: HOTPLUG FAILURES $title `cat $T.seq` + print_warning HOTPLUG FAILURES $title `cat $T.seq` echo " " $file exit 3 fi echo $title no success message, `grep --binary-files=text 'ver:' $file | wc -l` successful RCU version messages if test -s $T.seq then - echo WARNING $title `cat $T.seq` + print_warning $title `cat $T.seq` fi exit 2 fi -- cgit v1.2.3 From 32caccb8f47c032df55e77102ea43c627f1ca507 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 28 Oct 2013 08:57:29 -0700 Subject: rcutorture: Move checkarg to functions.sh Signed-off-by: Paul E. McKenney Cc: Greg KH --- .../testing/selftests/rcutorture/bin/functions.sh | 24 +++++++++++++++++++++ tools/testing/selftests/rcutorture/bin/kvm.sh | 25 +++------------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index 963b6f04d4ef..3052f1bea6bf 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -28,6 +28,30 @@ bootparam_hotplug_cpu () { echo "$1" | grep -q "rcutorture\.onoff_" } +# checkarg --argname argtype $# arg mustmatch cannotmatch +# +# Checks the specified argument "arg" against the mustmatch and cannotmatch +# patterns. +checkarg () { + if test $3 -le 1 + then + echo $1 needs argument $2 matching \"$5\" + usage + fi + if echo "$4" | grep -q -e "$5" + then + : + else + echo $1 $2 \"$4\" must match \"$5\" + usage + fi + if echo "$4" | grep -q -e "$6" + then + echo $1 $2 \"$4\" must not match \"$6\" + usage + fi +} + # configfrag_boot_params bootparam-string config-fragment-file # # Adds boot parameters from the .boot file, if any. diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 0783ec9c583e..7ba375ebe396 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -32,6 +32,7 @@ args="$*" dur=30 KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM +PATH=${KVM}/bin:$PATH; export PATH builddir="${KVM}/b1" RCU_INITRD="$KVM/initrd"; export RCU_INITRD RCU_KMAKE_ARG=""; export RCU_KMAKE_ARG @@ -40,6 +41,8 @@ configs="" ds=`date +%Y.%m.%d-%H:%M:%S` kversion="" +. functions.sh + usage () { echo "Usage: $scriptname optional arguments:" echo " --bootargs kernel-boot-arguments" @@ -60,27 +63,6 @@ usage () { exit 1 } -# checkarg --argname argtype $# arg mustmatch cannotmatch -checkarg () { - if test $3 -le 1 - then - echo $1 needs argument $2 matching \"$5\" - usage - fi - if echo "$4" | grep -q -e "$5" - then - : - else - echo $1 $2 \"$4\" must match \"$5\" - usage - fi - if echo "$4" | grep -q -e "$6" - then - echo $1 $2 \"$4\" must not match \"$6\" - usage - fi -} - while test $# -gt 0 do case "$1" in @@ -164,7 +146,6 @@ do shift done -PATH=${KVM}/bin:$PATH; export PATH CONFIGFRAG=${KVM}/configs; export CONFIGFRAG KVPATH=${CONFIGFRAG}/$kversion; export KVPATH -- cgit v1.2.3 From 0e342a87d5f0cd06697c3fdc5e8b49c61e558231 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 3 Dec 2013 09:54:18 -0800 Subject: rcutorture: Stop tracking FSF's postal address All of the rcutorture scripts has the usual GPL header, which contains a long-obsolete postal address for FSF. To avoid the need to track the FSF office's movements, this commit substitutes the URL where GPL may be found. Reported-by: Greg KH Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney --- tools/testing/selftests/rcutorture/bin/config2frag.sh | 4 ++-- .../testing/selftests/rcutorture/bin/configNR_CPUS.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/configcheck.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/configinit.sh | 18 ++++++++++++++++++ tools/testing/selftests/rcutorture/bin/cpus2use.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/functions.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/kvm-build.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 4 ++-- .../testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/kvm.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/parse-build.sh | 4 ++-- .../testing/selftests/rcutorture/bin/parse-console.sh | 4 ++-- .../selftests/rcutorture/bin/parse-rcutorture.sh | 4 ++-- .../selftests/rcutorture/configs/v0.0/ver_functions.sh | 4 ++-- .../selftests/rcutorture/configs/v3.3/ver_functions.sh | 4 ++-- .../selftests/rcutorture/configs/v3.5/ver_functions.sh | 4 ++-- .../selftests/rcutorture/configs/ver_functions.sh | 4 ++-- 17 files changed, 50 insertions(+), 32 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/config2frag.sh b/tools/testing/selftests/rcutorture/bin/config2frag.sh index 252f769c17ba..9f9ffcd427d3 100644 --- a/tools/testing/selftests/rcutorture/bin/config2frag.sh +++ b/tools/testing/selftests/rcutorture/bin/config2frag.sh @@ -15,8 +15,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # diff --git a/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh b/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh index 9e8b11206dcc..43540f1828cc 100755 --- a/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh +++ b/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh @@ -18,8 +18,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # diff --git a/tools/testing/selftests/rcutorture/bin/configcheck.sh b/tools/testing/selftests/rcutorture/bin/configcheck.sh index a3e5b9272b46..d686537dd55c 100755 --- a/tools/testing/selftests/rcutorture/bin/configcheck.sh +++ b/tools/testing/selftests/rcutorture/bin/configcheck.sh @@ -12,8 +12,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh index 939c16cd03ab..a1be6e62add1 100755 --- a/tools/testing/selftests/rcutorture/bin/configinit.sh +++ b/tools/testing/selftests/rcutorture/bin/configinit.sh @@ -13,6 +13,24 @@ # The second argument is a optional path to a build output directory, # for example, "O=/tmp/foo". If this argument is omitted, the .config # file will be generated directly in the current directory. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. +# +# Copyright (C) IBM Corporation, 2013 +# +# Authors: Paul E. McKenney T=/tmp/configinit.sh.$$ trap 'rm -rf $T' 0 diff --git a/tools/testing/selftests/rcutorture/bin/cpus2use.sh b/tools/testing/selftests/rcutorture/bin/cpus2use.sh index 277a3f6c8210..abe14b7f36e9 100755 --- a/tools/testing/selftests/rcutorture/bin/cpus2use.sh +++ b/tools/testing/selftests/rcutorture/bin/cpus2use.sh @@ -15,8 +15,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index 3052f1bea6bf..587561d7c035 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -13,8 +13,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # diff --git a/tools/testing/selftests/rcutorture/bin/kvm-build.sh b/tools/testing/selftests/rcutorture/bin/kvm-build.sh index 8c4aa7d63394..197901ec10bf 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-build.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-build.sh @@ -15,8 +15,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh index 874cd32d0486..baef09f3469b 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh @@ -17,8 +17,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 46f97d33e1ba..151b23788935 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh @@ -31,8 +31,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 7ba375ebe396..1b7923bf6a70 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -20,8 +20,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh index 9da2c7ba3fce..543230951c38 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-build.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh @@ -20,8 +20,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh index 8f4be78f06b6..4185d4cab32e 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-console.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh @@ -18,8 +18,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh index ac2f75a83225..dd0a275d9796 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh @@ -21,8 +21,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2011 # diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh index af7d59bf0988..e8052539af54 100644 --- a/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh +++ b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh @@ -13,8 +13,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh index 921fec931114..c37432f3572c 100644 --- a/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh +++ b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh @@ -13,8 +13,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh index 401974455aee..6a5f13aab44d 100644 --- a/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh +++ b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh @@ -13,8 +13,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # diff --git a/tools/testing/selftests/rcutorture/configs/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/ver_functions.sh index f99f23bc3934..5e40eadea777 100644 --- a/tools/testing/selftests/rcutorture/configs/ver_functions.sh +++ b/tools/testing/selftests/rcutorture/configs/ver_functions.sh @@ -13,8 +13,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # -- cgit v1.2.3 From f6f7ee9af7554e4d167ccd0ffe7cb8da0aa954f9 Mon Sep 17 00:00:00 2001 From: Fengguang Wu Date: Thu, 10 Oct 2013 11:08:33 -0700 Subject: rcu: Fix coccinelle warnings This commit fixes the following coccinelle warning: kernel/rcu/tree.c:712:9-10: WARNING: return of 0/1 in function 'rcu_lockdep_current_cpu_online' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: coccinelle/misc/boolreturn.cocci Signed-off-by: Fengguang Wu Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 30499508c72e..f8c029971bb3 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -725,7 +725,7 @@ bool rcu_lockdep_current_cpu_online(void) bool ret; if (in_nmi()) - return 1; + return true; preempt_disable(); rdp = this_cpu_ptr(&rcu_sched_data); rnp = rdp->mynode; -- cgit v1.2.3 From 04f34650ca5e8445aae0ab3e0ff6704f141150a8 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 16 Oct 2013 08:39:10 -0700 Subject: rcu: Fix CONFIG_RCU_FANOUT_EXACT for odd fanout/leaf values Each element of the rcu_state structure's ->levelspread[] array is intended to contain the per-level fanout, where the zero-th element corresponds to the root of the rcu_node tree, and the last element corresponds to the leaves. In the CONFIG_RCU_FANOUT_EXACT case, this means that the last element should be filled in from CONFIG_RCU_FANOUT_LEAF (or from the rcu_fanout_leaf boot parameter, if provided) and that the remaining elements should be filled in from CONFIG_RCU_FANOUT. Unfortunately, the current code in rcu_init_levelspread() takes the opposite approach, placing CONFIG_RCU_FANOUT_LEAF in the zero-th element and CONFIG_RCU_FANOUT in the remaining elements. For typical power-of-two values, this generates odd but functional rcu_node trees. However, other values, for example CONFIG_RCU_FANOUT=3 and CONFIG_RCU_FANOUT_LEAF=2, generate trees that can leave some CPUs out of the grace-period computation, resulting in too-short grace periods and therefore a broken RCU implementation. This commit therefore fixes rcu_init_levelspread() to set the last ->levelspread[] array element from CONFIG_RCU_FANOUT_LEAF and the remaining elements from CONFIG_RCU_FANOUT, thus generating the intended rcu_node trees. Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index f8c029971bb3..db1a9fdaeab8 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -3259,9 +3259,9 @@ static void __init rcu_init_levelspread(struct rcu_state *rsp) { int i; - for (i = rcu_num_lvls - 1; i > 0; i--) + rsp->levelspread[rcu_num_lvls - 1] = rcu_fanout_leaf; + for (i = rcu_num_lvls - 2; i >= 0; i--) rsp->levelspread[i] = CONFIG_RCU_FANOUT; - rsp->levelspread[0] = rcu_fanout_leaf; } #else /* #ifdef CONFIG_RCU_FANOUT_EXACT */ static void __init rcu_init_levelspread(struct rcu_state *rsp) -- cgit v1.2.3 From bc72d962d6a0ba8d9d5314d04fd1775261a9ec79 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sat, 26 Oct 2013 04:43:36 -0700 Subject: rcu: Improve SRCU's grace-period comments This commit documents the memory-barrier guarantees provided by synchronize_srcu() and call_srcu(). Signed-off-by: Paul E. McKenney --- kernel/rcu/srcu.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index 0f0c63111f20..3318d8284384 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c @@ -363,6 +363,29 @@ static void srcu_flip(struct srcu_struct *sp) /* * Enqueue an SRCU callback on the specified srcu_struct structure, * initiating grace-period processing if it is not already running. + * + * Note that all CPUs must agree that the grace period extended beyond + * all pre-existing SRCU read-side critical section. On systems with + * more than one CPU, this means that when "func()" is invoked, each CPU + * is guaranteed to have executed a full memory barrier since the end of + * its last corresponding SRCU read-side critical section whose beginning + * preceded the call to call_rcu(). It also means that each CPU executing + * an SRCU read-side critical section that continues beyond the start of + * "func()" must have executed a memory barrier after the call_rcu() + * but before the beginning of that SRCU read-side critical section. + * Note that these guarantees include CPUs that are offline, idle, or + * executing in user mode, as well as CPUs that are executing in the kernel. + * + * Furthermore, if CPU A invoked call_rcu() and CPU B invoked the + * resulting SRCU callback function "func()", then both CPU A and CPU + * B are guaranteed to execute a full memory barrier during the time + * interval between the call to call_rcu() and the invocation of "func()". + * This guarantee applies even if CPU A and CPU B are the same CPU (but + * again only if the system has more than one CPU). + * + * Of course, these guarantees apply only for invocations of call_srcu(), + * srcu_read_lock(), and srcu_read_unlock() that are all passed the same + * srcu_struct structure. */ void call_srcu(struct srcu_struct *sp, struct rcu_head *head, void (*func)(struct rcu_head *head)) @@ -459,7 +482,30 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount) * Note that it is illegal to call synchronize_srcu() from the corresponding * SRCU read-side critical section; doing so will result in deadlock. * However, it is perfectly legal to call synchronize_srcu() on one - * srcu_struct from some other srcu_struct's read-side critical section. + * srcu_struct from some other srcu_struct's read-side critical section, + * as long as the resulting graph of srcu_structs is acyclic. + * + * There are memory-ordering constraints implied by synchronize_srcu(). + * On systems with more than one CPU, when synchronize_srcu() returns, + * each CPU is guaranteed to have executed a full memory barrier since + * the end of its last corresponding SRCU-sched read-side critical section + * whose beginning preceded the call to synchronize_srcu(). In addition, + * each CPU having an SRCU read-side critical section that extends beyond + * the return from synchronize_srcu() is guaranteed to have executed a + * full memory barrier after the beginning of synchronize_srcu() and before + * the beginning of that SRCU read-side critical section. Note that these + * guarantees include CPUs that are offline, idle, or executing in user mode, + * as well as CPUs that are executing in the kernel. + * + * Furthermore, if CPU A invoked synchronize_srcu(), which returned + * to its caller on CPU B, then both CPU A and CPU B are guaranteed + * to have executed a full memory barrier during the execution of + * synchronize_srcu(). This guarantee applies even if CPU A and CPU B + * are the same CPU, but again only if the system has more than one CPU. + * + * Of course, these memory-ordering guarantees apply only when + * synchronize_srcu(), srcu_read_lock(), and srcu_read_unlock() are + * passed the same srcu_struct structure. */ void synchronize_srcu(struct srcu_struct *sp) { @@ -476,12 +522,8 @@ EXPORT_SYMBOL_GPL(synchronize_srcu); * Wait for an SRCU grace period to elapse, but be more aggressive about * spinning rather than blocking when waiting. * - * Note that it is also illegal to call synchronize_srcu_expedited() - * from the corresponding SRCU read-side critical section; - * doing so will result in deadlock. However, it is perfectly legal - * to call synchronize_srcu_expedited() on one srcu_struct from some - * other srcu_struct's read-side critical section, as long as - * the resulting graph of srcu_structs is acyclic. + * Note that synchronize_srcu_expedited() has the same deadlock and + * memory-ordering properties as does synchronize_srcu(). */ void synchronize_srcu_expedited(struct srcu_struct *sp) { -- cgit v1.2.3 From 24ef659a857c3cba40b64ea51ea4fce8d2fb7bbc Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 28 Oct 2013 09:22:24 -0700 Subject: rcu: Provide better diagnostics for blocking in RCU callback functions Currently blocking in an RCU callback function will result in "scheduling while atomic", which could be triggered for any number of reasons. To aid debugging, this patch introduces a rcu_callback_map that is used to tie the inappropriate voluntary context switch back to the fact that the function is being invoked from within a callback. Signed-off-by: Paul E. McKenney --- include/linux/rcupdate.h | 1 + kernel/rcu/rcu.h | 3 +++ kernel/rcu/update.c | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 39cbb889e20d..a94a5805d378 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -325,6 +325,7 @@ static inline void rcu_lock_release(struct lockdep_map *map) extern struct lockdep_map rcu_lock_map; extern struct lockdep_map rcu_bh_lock_map; extern struct lockdep_map rcu_sched_lock_map; +extern struct lockdep_map rcu_callback_map; extern int debug_lockdep_rcu_enabled(void); /** diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index 7859a0a3951e..a8f981a2d110 100644 --- a/kernel/rcu/rcu.h +++ b/kernel/rcu/rcu.h @@ -102,13 +102,16 @@ static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head) { unsigned long offset = (unsigned long)head->func; + rcu_lock_acquire(&rcu_callback_map); if (__is_kfree_rcu_offset(offset)) { RCU_TRACE(trace_rcu_invoke_kfree_callback(rn, head, offset)); kfree((void *)head - offset); + rcu_lock_release(&rcu_callback_map); return 1; } else { RCU_TRACE(trace_rcu_invoke_callback(rn, head)); head->func(head); + rcu_lock_release(&rcu_callback_map); return 0; } } diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 6cb3dff89e2b..802365ccd591 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -128,6 +128,11 @@ struct lockdep_map rcu_sched_lock_map = STATIC_LOCKDEP_MAP_INIT("rcu_read_lock_sched", &rcu_sched_lock_key); EXPORT_SYMBOL_GPL(rcu_sched_lock_map); +static struct lock_class_key rcu_callback_key; +struct lockdep_map rcu_callback_map = + STATIC_LOCKDEP_MAP_INIT("rcu_callback", &rcu_callback_key); +EXPORT_SYMBOL_GPL(rcu_callback_map); + int notrace debug_lockdep_rcu_enabled(void) { return rcu_scheduler_active && debug_locks && -- cgit v1.2.3 From ac7c8e3dd2ed6489be1f6bc722029fb4855c3a34 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 11 Oct 2013 10:17:39 -0700 Subject: rcu: Add comment on evaluate-once properties of rcu_assign_pointer(). The rcu_assign_pointer() macro, as with most cpp macros, must not evaluate its argument more than once. And it in fact does not. But this might not be obvious to the casual observer, because one of the arguments appears no less than three times. However, but one expansion is only visible to sparse (__CHECKER__), and one lives inside a typeof (where it will never be evaluated), so this is in fact safe. This commit therefore adds a comment making this explicit. Reported-by: Josh Triplett Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- include/linux/rcupdate.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 39cbb889e20d..00ad28168ef0 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -911,6 +911,14 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) * rcu_assign_pointer() is a very bad thing that results in * impossible-to-diagnose memory corruption. So please be careful. * See the RCU_INIT_POINTER() comment header for details. + * + * Note that rcu_assign_pointer() evaluates each of its arguments only + * once, appearances notwithstanding. One of the "extra" evaluations + * is in typeof() and the other visible only to sparse (__CHECKER__), + * neither of which actually execute the argument. As with most cpp + * macros, this execute-arguments-only-once property is important, so + * please be careful when making changes to rcu_assign_pointer() and the + * other macros that it invokes. */ #define rcu_assign_pointer(p, v) \ __rcu_assign_pointer((p), (v), __rcu) -- cgit v1.2.3 From 36708b89e00951b004b4dd6c14181301e2e98354 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 9 Dec 2013 15:19:53 -0800 Subject: bonding: Use RCU_INIT_POINTER() for better overhead and for sparse Although rcu_assign_pointer() can be used to assign a constant NULL pointer, doing so gets you an unnecessary memory barrier and in some circumstances, sparse warnings. This commit therefore changes the rcu_assign_pointer() of NULL in __bond_release_one() to RCU_INIT_POINTER(). Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4dd5ee2a34cc..a0b97c4c655d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1763,7 +1763,7 @@ static int __bond_release_one(struct net_device *bond_dev, } if (all) { - rcu_assign_pointer(bond->curr_active_slave, NULL); + RCU_INIT_POINTER(bond->curr_active_slave, NULL); } else if (oldcurrent == slave) { /* * Note that we hold RTNL over this sequence, so there -- cgit v1.2.3 From 9d162cd06349dfee6b4f254b3abf1355cf0aee43 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sun, 1 Sep 2013 16:42:52 -0700 Subject: rcu: Make rcu_assign_pointer's assignment volatile and type-safe The rcu_assign_pointer() primitive needs to use ACCESS_ONCE to make the assignment to the destination pointer volatile, to protect against compilers too clever for their own good. Signed-off-by: Josh Triplett Signed-off-by: Paul E. McKenney --- include/linux/rcupdate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 00ad28168ef0..97853cd2d7b4 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -551,7 +551,7 @@ static inline void rcu_preempt_sleep_check(void) #define __rcu_assign_pointer(p, v, space) \ do { \ smp_wmb(); \ - (p) = (typeof(*v) __force space *)(v); \ + ACCESS_ONCE(p) = (typeof(*(v)) __force space *)(v); \ } while (0) -- cgit v1.2.3 From 462225ae47d7175f886281d8a91708550cd5178c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 11 Nov 2013 09:59:34 -0800 Subject: rcu: Add an RCU_INITIALIZER for global RCU-protected pointers There is currently no way to initialize a global RCU-protected pointer without either putting up with sparse complaints or open-coding an obscure cast. This commit therefore creates RCU_INITIALIZER(), which is intended to be used as follows: struct foo __rcu *p = RCU_INITIALIZER(&my_rcu_structure); This commit also applies RCU_INITIALIZER() to eliminate repeated open-coded obscure casts in __rcu_assign_pointer(), RCU_INIT_POINTER(), and RCU_POINTER_INITIALIZER(). This commit also inlines __rcu_assign_pointer() into its only caller, rcu_assign_pointer(). Suggested-by: Steven Rostedt Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- include/linux/rcupdate.h | 80 +++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 97853cd2d7b4..ea3816cf1a13 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -548,10 +548,48 @@ static inline void rcu_preempt_sleep_check(void) smp_read_barrier_depends(); \ (_________p1); \ }) -#define __rcu_assign_pointer(p, v, space) \ + +/** + * RCU_INITIALIZER() - statically initialize an RCU-protected global variable + * @v: The value to statically initialize with. + */ +#define RCU_INITIALIZER(v) (typeof(*(v)) __force __rcu *)(v) + +/** + * rcu_assign_pointer() - assign to RCU-protected pointer + * @p: pointer to assign to + * @v: value to assign (publish) + * + * Assigns the specified value to the specified RCU-protected + * pointer, ensuring that any concurrent RCU readers will see + * any prior initialization. + * + * Inserts memory barriers on architectures that require them + * (which is most of them), and also prevents the compiler from + * reordering the code that initializes the structure after the pointer + * assignment. More importantly, this call documents which pointers + * will be dereferenced by RCU read-side code. + * + * In some special cases, you may use RCU_INIT_POINTER() instead + * of rcu_assign_pointer(). RCU_INIT_POINTER() is a bit faster due + * to the fact that it does not constrain either the CPU or the compiler. + * That said, using RCU_INIT_POINTER() when you should have used + * rcu_assign_pointer() is a very bad thing that results in + * impossible-to-diagnose memory corruption. So please be careful. + * See the RCU_INIT_POINTER() comment header for details. + * + * Note that rcu_assign_pointer() evaluates each of its arguments only + * once, appearances notwithstanding. One of the "extra" evaluations + * is in typeof() and the other visible only to sparse (__CHECKER__), + * neither of which actually execute the argument. As with most cpp + * macros, this execute-arguments-only-once property is important, so + * please be careful when making changes to rcu_assign_pointer() and the + * other macros that it invokes. + */ +#define rcu_assign_pointer(p, v) \ do { \ smp_wmb(); \ - ACCESS_ONCE(p) = (typeof(*(v)) __force space *)(v); \ + ACCESS_ONCE(p) = RCU_INITIALIZER(v); \ } while (0) @@ -889,40 +927,6 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) preempt_enable_notrace(); } -/** - * rcu_assign_pointer() - assign to RCU-protected pointer - * @p: pointer to assign to - * @v: value to assign (publish) - * - * Assigns the specified value to the specified RCU-protected - * pointer, ensuring that any concurrent RCU readers will see - * any prior initialization. - * - * Inserts memory barriers on architectures that require them - * (which is most of them), and also prevents the compiler from - * reordering the code that initializes the structure after the pointer - * assignment. More importantly, this call documents which pointers - * will be dereferenced by RCU read-side code. - * - * In some special cases, you may use RCU_INIT_POINTER() instead - * of rcu_assign_pointer(). RCU_INIT_POINTER() is a bit faster due - * to the fact that it does not constrain either the CPU or the compiler. - * That said, using RCU_INIT_POINTER() when you should have used - * rcu_assign_pointer() is a very bad thing that results in - * impossible-to-diagnose memory corruption. So please be careful. - * See the RCU_INIT_POINTER() comment header for details. - * - * Note that rcu_assign_pointer() evaluates each of its arguments only - * once, appearances notwithstanding. One of the "extra" evaluations - * is in typeof() and the other visible only to sparse (__CHECKER__), - * neither of which actually execute the argument. As with most cpp - * macros, this execute-arguments-only-once property is important, so - * please be careful when making changes to rcu_assign_pointer() and the - * other macros that it invokes. - */ -#define rcu_assign_pointer(p, v) \ - __rcu_assign_pointer((p), (v), __rcu) - /** * RCU_INIT_POINTER() - initialize an RCU protected pointer * @@ -957,7 +961,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) */ #define RCU_INIT_POINTER(p, v) \ do { \ - p = (typeof(*v) __force __rcu *)(v); \ + p = RCU_INITIALIZER(v); \ } while (0) /** @@ -966,7 +970,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) * GCC-style initialization for an RCU-protected pointer in a structure field. */ #define RCU_POINTER_INITIALIZER(p, v) \ - .p = (typeof(*v) __force __rcu *)(v) + .p = RCU_INITIALIZER(v) /* * Does the specified offset indicate that the corresponding rcu_head -- cgit v1.2.3 From 79a62f957e0b37c59610a96d018cc341aebb48f4 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Wed, 30 Oct 2013 04:13:22 -0700 Subject: rcu: Warn on allegedly impossible rcu_read_unlock_special() from irq After commit #10f39bb1b2c1 (rcu: protect __rcu_read_unlock() against scheduler-using irq handlers), it is no longer possible to enter the main body of rcu_read_lock_special() from an NMI, interrupt, or softirq handler. In theory, this implies that the check for "in_irq() || in_serving_softirq()" must always fail, so that in theory this check could be removed entirely. In practice, this commit wraps this condition with a WARN_ON_ONCE(). If this warning never triggers, then the condition will be removed entirely. [ paulmck: And one way of triggering the WARN_ON() is if a scheduling clock interrupt occurs in an RCU read-side critical section, setting RCU_READ_UNLOCK_NEED_QS, which is handled by rcu_read_unlock_special(). Updated this commit to return if only that bit was set. ] Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney --- kernel/rcu/tree_plugin.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 752ffaa0d681..fa7a18b62253 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -361,10 +361,14 @@ void rcu_read_unlock_special(struct task_struct *t) special = t->rcu_read_unlock_special; if (special & RCU_READ_UNLOCK_NEED_QS) { rcu_preempt_qs(smp_processor_id()); + if (!t->rcu_read_unlock_special) { + local_irq_restore(flags); + return; + } } - /* Hardware IRQ handlers cannot block. */ - if (in_irq() || in_serving_softirq()) { + /* Hardware IRQ handlers cannot block, complain if they get here. */ + if (WARN_ON_ONCE(in_irq() || in_serving_softirq())) { local_irq_restore(flags); return; } -- cgit v1.2.3 From a096932f0c9c9dca9cce72f1c0fb2395df8f2dff Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Nov 2013 09:03:10 -0800 Subject: rcu: Don't activate RCU core on NO_HZ_FULL CPUs Whenever a CPU receives a scheduling-clock interrupt, RCU checks to see if the RCU core needs anything from this CPU. If so, RCU raises RCU_SOFTIRQ to carry out any needed processing. This approach has worked well historically, but it is undesirable on NO_HZ_FULL CPUs. Such CPUs are expected to spend almost all of their time in userspace, so that scheduling-clock interrupts can be disabled while there is only one runnable task on the CPU in question. Unfortunately, raising any softirq has the potential to wake up ksoftirqd, which would provide the second runnable task on that CPU, preventing disabling of scheduling-clock interrupts. What is needed instead is for RCU to leave NO_HZ_FULL CPUs alone, relying on the grace-period kthreads' quiescent-state forcing to do any needed RCU work on behalf of those CPUs. This commit therefore refrains from raising RCU_SOFTIRQ on any NO_HZ_FULL CPUs during any grace periods that have been in effect for less than one second. The one-second limit handles the case where an inappropriate workload is running on a NO_HZ_FULL CPU that features lots of scheduling-clock interrupts, but no idle or userspace time. Reported-by: Mike Galbraith Signed-off-by: Paul E. McKenney Tested-by: Mike Galbraith Toasted-by: Frederic Weisbecker --- kernel/rcu/tree.c | 4 ++++ kernel/rcu/tree.h | 1 + kernel/rcu/tree_plugin.h | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index db1a9fdaeab8..e37bd561c26f 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2796,6 +2796,10 @@ static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp) /* Check for CPU stalls, if enabled. */ check_cpu_stall(rsp, rdp); + /* Is this CPU a NO_HZ_FULL CPU that should ignore RCU? */ + if (rcu_nohz_full_cpu(rsp)) + return 0; + /* Is the RCU core waiting for a quiescent state from this CPU? */ if (rcu_scheduler_fully_active && rdp->qs_pending && !rdp->passed_quiesce) { diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index a87adfc2916b..8c19873f1ac9 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -571,6 +571,7 @@ static void rcu_sysidle_report_gp(struct rcu_state *rsp, int isidle, unsigned long maxj); static void rcu_bind_gp_kthread(void); static void rcu_sysidle_init_percpu_data(struct rcu_dynticks *rdtp); +static bool rcu_nohz_full_cpu(struct rcu_state *rsp); #endif /* #ifndef RCU_TREE_NONCORE */ diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index fa7a18b62253..e0885cb6c599 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -2872,3 +2872,23 @@ static void rcu_sysidle_init_percpu_data(struct rcu_dynticks *rdtp) } #endif /* #else #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */ + +/* + * Is this CPU a NO_HZ_FULL CPU that should ignore RCU so that the + * grace-period kthread will do force_quiescent_state() processing? + * The idea is to avoid waking up RCU core processing on such a + * CPU unless the grace period has extended for too long. + * + * This code relies on the fact that all NO_HZ_FULL CPUs are also + * CONFIG_RCU_NOCB_CPUs. + */ +static bool rcu_nohz_full_cpu(struct rcu_state *rsp) +{ +#ifdef CONFIG_NO_HZ_FULL + if (tick_nohz_full_cpu(smp_processor_id()) && + (!rcu_gp_in_progress(rsp) || + ULONG_CMP_LT(jiffies, ACCESS_ONCE(rsp->gp_start) + HZ))) + return 1; +#endif /* #ifdef CONFIG_NO_HZ_FULL */ + return 0; +} -- cgit v1.2.3 From d10089508613f42b8b54cf33456a821c7cf3d442 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Thu, 7 Nov 2013 10:30:25 +0800 Subject: rcu/torture: Dynamically allocate SRCU output buffer to avoid overflow If the rcutorture SRCU output exceeds 4096 bytes, for example, if you have more than about 75 CPUs, it will overflow the current statically allocated buffer. This commit therefore replaces this static buffer with a dynamically buffer whose size is based on the number of CPUs. Benefits: - Avoids both buffer overflow and output truncation. - Handles an arbitrarily large number of CPUs. - Straightforward implementation. Shortcomings: - Some memory is wasted: 1 cpu now comsumes 50 - 60 bytes, and this patch provides 200 bytes. Therefore, for 1K CPUs, roughly 100KB of memory will be wasted. However, the memory is freed immediately after printing, so this wastage should not be a problem in practice. Testing (Fedora16 2 CPUs, 2GB RAM x86_64): - as module, with/without "torture_type=srcu". - build-in not boot runnable, with/without "torture_type=srcu". - build-in let boot runnable, with/without "torture_type=srcu". Signed-off-by: Chen Gang Signed-off-by: Paul E. McKenney --- kernel/rcu/torture.c | 67 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/kernel/rcu/torture.c b/kernel/rcu/torture.c index 69a4ec80a788..732f8ae3086a 100644 --- a/kernel/rcu/torture.c +++ b/kernel/rcu/torture.c @@ -139,8 +139,6 @@ MODULE_PARM_DESC(verbose, "Enable verbose debugging printk()s"); #define VERBOSE_PRINTK_ERRSTRING(s) \ do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0) -static char printk_buf[4096]; - static int nrealreaders; static struct task_struct *writer_task; static struct task_struct **fakewriter_tasks; @@ -376,7 +374,7 @@ struct rcu_torture_ops { void (*call)(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); void (*cb_barrier)(void); void (*fqs)(void); - int (*stats)(char *page); + void (*stats)(char *page); int irq_capable; int can_boost; const char *name; @@ -578,21 +576,19 @@ static void srcu_torture_barrier(void) srcu_barrier(&srcu_ctl); } -static int srcu_torture_stats(char *page) +static void srcu_torture_stats(char *page) { - int cnt = 0; int cpu; int idx = srcu_ctl.completed & 0x1; - cnt += sprintf(&page[cnt], "%s%s per-CPU(idx=%d):", + page += sprintf(page, "%s%s per-CPU(idx=%d):", torture_type, TORTURE_FLAG, idx); for_each_possible_cpu(cpu) { - cnt += sprintf(&page[cnt], " %d(%lu,%lu)", cpu, + page += sprintf(page, " %d(%lu,%lu)", cpu, per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[!idx], per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[idx]); } - cnt += sprintf(&page[cnt], "\n"); - return cnt; + sprintf(page, "\n"); } static void srcu_torture_synchronize_expedited(void) @@ -1052,10 +1048,9 @@ rcu_torture_reader(void *arg) /* * Create an RCU-torture statistics message in the specified buffer. */ -static int +static void rcu_torture_printk(char *page) { - int cnt = 0; int cpu; int i; long pipesummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 }; @@ -1071,8 +1066,8 @@ rcu_torture_printk(char *page) if (pipesummary[i] != 0) break; } - cnt += sprintf(&page[cnt], "%s%s ", torture_type, TORTURE_FLAG); - cnt += sprintf(&page[cnt], + page += sprintf(page, "%s%s ", torture_type, TORTURE_FLAG); + page += sprintf(page, "rtc: %p ver: %lu tfle: %d rta: %d rtaf: %d rtf: %d ", rcu_torture_current, rcu_torture_current_version, @@ -1080,53 +1075,52 @@ rcu_torture_printk(char *page) atomic_read(&n_rcu_torture_alloc), atomic_read(&n_rcu_torture_alloc_fail), atomic_read(&n_rcu_torture_free)); - cnt += sprintf(&page[cnt], "rtmbe: %d rtbke: %ld rtbre: %ld ", + page += sprintf(page, "rtmbe: %d rtbke: %ld rtbre: %ld ", atomic_read(&n_rcu_torture_mberror), n_rcu_torture_boost_ktrerror, n_rcu_torture_boost_rterror); - cnt += sprintf(&page[cnt], "rtbf: %ld rtb: %ld nt: %ld ", + page += sprintf(page, "rtbf: %ld rtb: %ld nt: %ld ", n_rcu_torture_boost_failure, n_rcu_torture_boosts, n_rcu_torture_timers); - cnt += sprintf(&page[cnt], + page += sprintf(page, "onoff: %ld/%ld:%ld/%ld %d,%d:%d,%d %lu:%lu (HZ=%d) ", n_online_successes, n_online_attempts, n_offline_successes, n_offline_attempts, min_online, max_online, min_offline, max_offline, sum_online, sum_offline, HZ); - cnt += sprintf(&page[cnt], "barrier: %ld/%ld:%ld", + page += sprintf(page, "barrier: %ld/%ld:%ld", n_barrier_successes, n_barrier_attempts, n_rcu_torture_barrier_error); - cnt += sprintf(&page[cnt], "\n%s%s ", torture_type, TORTURE_FLAG); + page += sprintf(page, "\n%s%s ", torture_type, TORTURE_FLAG); if (atomic_read(&n_rcu_torture_mberror) != 0 || n_rcu_torture_barrier_error != 0 || n_rcu_torture_boost_ktrerror != 0 || n_rcu_torture_boost_rterror != 0 || n_rcu_torture_boost_failure != 0 || i > 1) { - cnt += sprintf(&page[cnt], "!!! "); + page += sprintf(page, "!!! "); atomic_inc(&n_rcu_torture_error); WARN_ON_ONCE(1); } - cnt += sprintf(&page[cnt], "Reader Pipe: "); + page += sprintf(page, "Reader Pipe: "); for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) - cnt += sprintf(&page[cnt], " %ld", pipesummary[i]); - cnt += sprintf(&page[cnt], "\n%s%s ", torture_type, TORTURE_FLAG); - cnt += sprintf(&page[cnt], "Reader Batch: "); + page += sprintf(page, " %ld", pipesummary[i]); + page += sprintf(page, "\n%s%s ", torture_type, TORTURE_FLAG); + page += sprintf(page, "Reader Batch: "); for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) - cnt += sprintf(&page[cnt], " %ld", batchsummary[i]); - cnt += sprintf(&page[cnt], "\n%s%s ", torture_type, TORTURE_FLAG); - cnt += sprintf(&page[cnt], "Free-Block Circulation: "); + page += sprintf(page, " %ld", batchsummary[i]); + page += sprintf(page, "\n%s%s ", torture_type, TORTURE_FLAG); + page += sprintf(page, "Free-Block Circulation: "); for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) { - cnt += sprintf(&page[cnt], " %d", + page += sprintf(page, " %d", atomic_read(&rcu_torture_wcount[i])); } - cnt += sprintf(&page[cnt], "\n"); + page += sprintf(page, "\n"); if (cur_ops->stats) - cnt += cur_ops->stats(&page[cnt]); - return cnt; + cur_ops->stats(page); } /* @@ -1140,10 +1134,17 @@ rcu_torture_printk(char *page) static void rcu_torture_stats_print(void) { - int cnt; + int size = nr_cpu_ids * 200 + 8192; + char *buf; - cnt = rcu_torture_printk(printk_buf); - pr_alert("%s", printk_buf); + buf = kmalloc(size, GFP_KERNEL); + if (!buf) { + pr_err("rcu-torture: Out of memory, need: %d", size); + return; + } + rcu_torture_printk(buf); + pr_alert("%s", buf); + kfree(buf); } /* -- cgit v1.2.3 From 584dc4ce55267765b415a8517613d1207f1741e5 Mon Sep 17 00:00:00 2001 From: Teodora Baluta Date: Mon, 11 Nov 2013 17:11:23 +0200 Subject: rcu: Remove "extern" from function declarations in include/linux/*rcu*.h Function prototypes don't need to have the "extern" keyword since this is the default behavior. Its explicit use is redundant. This commit therefore removes them. Signed-off-by: Teodora Baluta Signed-off-by: Paul E. McKenney --- include/linux/rculist.h | 4 +-- include/linux/rcupdate.h | 80 ++++++++++++++++++++++++------------------------ include/linux/rcutiny.h | 2 +- include/linux/rcutree.h | 36 +++++++++++----------- 4 files changed, 61 insertions(+), 61 deletions(-) diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 45a0a9e81478..dbaf99084112 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h @@ -55,8 +55,8 @@ static inline void __list_add_rcu(struct list_head *new, next->prev = new; } #else -extern void __list_add_rcu(struct list_head *new, - struct list_head *prev, struct list_head *next); +void __list_add_rcu(struct list_head *new, + struct list_head *prev, struct list_head *next); #endif /** diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index a94a5805d378..52c1b13c4d76 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -50,13 +50,13 @@ extern int rcutorture_runnable; /* for sysctl */ #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) -extern void rcutorture_record_test_transition(void); -extern void rcutorture_record_progress(unsigned long vernum); -extern void do_trace_rcu_torture_read(const char *rcutorturename, - struct rcu_head *rhp, - unsigned long secs, - unsigned long c_old, - unsigned long c); +void rcutorture_record_test_transition(void); +void rcutorture_record_progress(unsigned long vernum); +void do_trace_rcu_torture_read(const char *rcutorturename, + struct rcu_head *rhp, + unsigned long secs, + unsigned long c_old, + unsigned long c); #else static inline void rcutorture_record_test_transition(void) { @@ -65,11 +65,11 @@ static inline void rcutorture_record_progress(unsigned long vernum) { } #ifdef CONFIG_RCU_TRACE -extern void do_trace_rcu_torture_read(const char *rcutorturename, - struct rcu_head *rhp, - unsigned long secs, - unsigned long c_old, - unsigned long c); +void do_trace_rcu_torture_read(const char *rcutorturename, + struct rcu_head *rhp, + unsigned long secs, + unsigned long c_old, + unsigned long c); #else #define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ do { } while (0) @@ -118,8 +118,8 @@ extern void do_trace_rcu_torture_read(const char *rcutorturename, * if CPU A and CPU B are the same CPU (but again only if the system has * more than one CPU). */ -extern void call_rcu(struct rcu_head *head, - void (*func)(struct rcu_head *head)); +void call_rcu(struct rcu_head *head, + void (*func)(struct rcu_head *head)); #else /* #ifdef CONFIG_PREEMPT_RCU */ @@ -149,8 +149,8 @@ extern void call_rcu(struct rcu_head *head, * See the description of call_rcu() for more detailed information on * memory ordering guarantees. */ -extern void call_rcu_bh(struct rcu_head *head, - void (*func)(struct rcu_head *head)); +void call_rcu_bh(struct rcu_head *head, + void (*func)(struct rcu_head *head)); /** * call_rcu_sched() - Queue an RCU for invocation after sched grace period. @@ -171,16 +171,16 @@ extern void call_rcu_bh(struct rcu_head *head, * See the description of call_rcu() for more detailed information on * memory ordering guarantees. */ -extern void call_rcu_sched(struct rcu_head *head, - void (*func)(struct rcu_head *rcu)); +void call_rcu_sched(struct rcu_head *head, + void (*func)(struct rcu_head *rcu)); -extern void synchronize_sched(void); +void synchronize_sched(void); #ifdef CONFIG_PREEMPT_RCU -extern void __rcu_read_lock(void); -extern void __rcu_read_unlock(void); -extern void rcu_read_unlock_special(struct task_struct *t); +void __rcu_read_lock(void); +void __rcu_read_unlock(void); +void rcu_read_unlock_special(struct task_struct *t); void synchronize_rcu(void); /* @@ -216,19 +216,19 @@ static inline int rcu_preempt_depth(void) #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ /* Internal to kernel */ -extern void rcu_init(void); -extern void rcu_sched_qs(int cpu); -extern void rcu_bh_qs(int cpu); -extern void rcu_check_callbacks(int cpu, int user); +void rcu_init(void); +void rcu_sched_qs(int cpu); +void rcu_bh_qs(int cpu); +void rcu_check_callbacks(int cpu, int user); struct notifier_block; -extern void rcu_idle_enter(void); -extern void rcu_idle_exit(void); -extern void rcu_irq_enter(void); -extern void rcu_irq_exit(void); +void rcu_idle_enter(void); +void rcu_idle_exit(void); +void rcu_irq_enter(void); +void rcu_irq_exit(void); #ifdef CONFIG_RCU_USER_QS -extern void rcu_user_enter(void); -extern void rcu_user_exit(void); +void rcu_user_enter(void); +void rcu_user_exit(void); #else static inline void rcu_user_enter(void) { } static inline void rcu_user_exit(void) { } @@ -262,7 +262,7 @@ static inline void rcu_user_hooks_switch(struct task_struct *prev, } while (0) #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) -extern bool __rcu_is_watching(void); +bool __rcu_is_watching(void); #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */ /* @@ -289,8 +289,8 @@ void wait_rcu_gp(call_rcu_func_t crf); * initialization. */ #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD -extern void init_rcu_head_on_stack(struct rcu_head *head); -extern void destroy_rcu_head_on_stack(struct rcu_head *head); +void init_rcu_head_on_stack(struct rcu_head *head); +void destroy_rcu_head_on_stack(struct rcu_head *head); #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ static inline void init_rcu_head_on_stack(struct rcu_head *head) { @@ -363,7 +363,7 @@ static inline int rcu_read_lock_held(void) * rcu_read_lock_bh_held() is defined out of line to avoid #include-file * hell. */ -extern int rcu_read_lock_bh_held(void); +int rcu_read_lock_bh_held(void); /** * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section? @@ -449,7 +449,7 @@ static inline int rcu_read_lock_sched_held(void) #ifdef CONFIG_PROVE_RCU -extern int rcu_my_thread_group_empty(void); +int rcu_my_thread_group_empty(void); /** * rcu_lockdep_assert - emit lockdep splat if specified condition not met @@ -1006,7 +1006,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) #ifdef CONFIG_RCU_NOCB_CPU -extern bool rcu_is_nocb_cpu(int cpu); +bool rcu_is_nocb_cpu(int cpu); #else static inline bool rcu_is_nocb_cpu(int cpu) { return false; } #endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */ @@ -1014,8 +1014,8 @@ static inline bool rcu_is_nocb_cpu(int cpu) { return false; } /* Only for use by adaptive-ticks code. */ #ifdef CONFIG_NO_HZ_FULL_SYSIDLE -extern bool rcu_sys_is_idle(void); -extern void rcu_sysidle_force_exit(void); +bool rcu_sys_is_idle(void); +void rcu_sysidle_force_exit(void); #else /* #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */ static inline bool rcu_sys_is_idle(void) diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 09ebcbe9fd78..6f01771b571c 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h @@ -125,7 +125,7 @@ static inline void exit_rcu(void) #ifdef CONFIG_DEBUG_LOCK_ALLOC extern int rcu_scheduler_active __read_mostly; -extern void rcu_scheduler_starting(void); +void rcu_scheduler_starting(void); #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ static inline void rcu_scheduler_starting(void) { diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 4b9c81548742..72137ee8c603 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h @@ -30,9 +30,9 @@ #ifndef __LINUX_RCUTREE_H #define __LINUX_RCUTREE_H -extern void rcu_note_context_switch(int cpu); -extern int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); -extern void rcu_cpu_stall_reset(void); +void rcu_note_context_switch(int cpu); +int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); +void rcu_cpu_stall_reset(void); /* * Note a virtualization-based context switch. This is simply a @@ -44,9 +44,9 @@ static inline void rcu_virt_note_context_switch(int cpu) rcu_note_context_switch(cpu); } -extern void synchronize_rcu_bh(void); -extern void synchronize_sched_expedited(void); -extern void synchronize_rcu_expedited(void); +void synchronize_rcu_bh(void); +void synchronize_sched_expedited(void); +void synchronize_rcu_expedited(void); void kfree_call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); @@ -71,25 +71,25 @@ static inline void synchronize_rcu_bh_expedited(void) synchronize_sched_expedited(); } -extern void rcu_barrier(void); -extern void rcu_barrier_bh(void); -extern void rcu_barrier_sched(void); +void rcu_barrier(void); +void rcu_barrier_bh(void); +void rcu_barrier_sched(void); extern unsigned long rcutorture_testseq; extern unsigned long rcutorture_vernum; -extern long rcu_batches_completed(void); -extern long rcu_batches_completed_bh(void); -extern long rcu_batches_completed_sched(void); +long rcu_batches_completed(void); +long rcu_batches_completed_bh(void); +long rcu_batches_completed_sched(void); -extern void rcu_force_quiescent_state(void); -extern void rcu_bh_force_quiescent_state(void); -extern void rcu_sched_force_quiescent_state(void); +void rcu_force_quiescent_state(void); +void rcu_bh_force_quiescent_state(void); +void rcu_sched_force_quiescent_state(void); -extern void exit_rcu(void); +void exit_rcu(void); -extern void rcu_scheduler_starting(void); +void rcu_scheduler_starting(void); extern int rcu_scheduler_active __read_mostly; -extern bool rcu_is_watching(void); +bool rcu_is_watching(void); #endif /* __LINUX_RCUTREE_H */ -- cgit v1.2.3 From bd73a7f5cd434f5aa611c9043490911c32084270 Mon Sep 17 00:00:00 2001 From: Teodora Baluta Date: Mon, 11 Nov 2013 17:11:24 +0200 Subject: rcu: Remove "extern" from function declarations in kernel/rcu/rcu.h Function prototypes don't need to have the "extern" keyword since this is the default behavior. Its explicit use is redundant. This commit therefore removes them. Signed-off-by: Teodora Baluta Signed-off-by: Paul E. McKenney --- kernel/rcu/rcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index a8f981a2d110..79c3877e9c5b 100644 --- a/kernel/rcu/rcu.h +++ b/kernel/rcu/rcu.h @@ -96,7 +96,7 @@ static inline void debug_rcu_head_unqueue(struct rcu_head *head) } #endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ -extern void kfree(const void *); +void kfree(const void *); static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head) { -- cgit v1.2.3