aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/locking
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-22 17:01:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-22 17:01:01 -0400
commitfc934d40178ad4e551a17e2733241d9f29fddd70 (patch)
tree43e3f3c9019915cc41befec4dad5d1328a4cae63 /kernel/locking
parent052b398a43a7de8c68c13e7fa05d6b3d16ce6801 (diff)
parent085c789783f5f95c253740d3d0a1659ec5ff32a8 (diff)
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU updates from Ingo Molnar: - Continued initialization/Kconfig updates: hide most Kconfig options from unsuspecting users. There's now a single high level configuration option: * * RCU Subsystem * Make expert-level adjustments to RCU configuration (RCU_EXPERT) [N/y/?] (NEW) Which if answered in the negative, leaves us with a single interactive configuration option: Offload RCU callback processing from boot-selected CPUs (RCU_NOCB_CPU) [N/y/?] (NEW) All the rest of the RCU options are configured automatically. Later on we'll remove this single leftover configuration option as well. - Remove all uses of RCU-protected array indexes: replace the rcu_[access|dereference]_index_check() APIs with READ_ONCE() and rcu_lockdep_assert() - RCU CPU-hotplug cleanups - Updates to Tiny RCU: a race fix and further code shrinkage. - RCU torture-testing updates: fixes, speedups, cleanups and documentation updates. - Miscellaneous fixes - Documentation updates * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits) rcutorture: Allow repetition factors in Kconfig-fragment lists rcutorture: Display "make oldconfig" errors rcutorture: Update TREE_RCU-kconfig.txt rcutorture: Make rcutorture scripts force RCU_EXPERT rcutorture: Update configuration fragments for rcutree.rcu_fanout_exact rcutorture: TASKS_RCU set directly, so don't explicitly set it rcutorture: Test SRCU cleanup code path rcutorture: Replace barriers with smp_store_release() and smp_load_acquire() locktorture: Change longdelay_us to longdelay_ms rcutorture: Allow negative values of nreaders to oversubscribe rcutorture: Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug rcutorture: Exchange TREE03 and TREE04 geometries locktorture: fix deadlock in 'rw_lock_irq' type rcu: Correctly handle non-empty Tiny RCU callback list with none ready rcutorture: Test both RCU-sched and RCU-bh for Tiny RCU rcu: Further shrink Tiny RCU by making empty functions static inlines rcu: Conditionally compile RCU's eqs warnings rcu: Remove prompt for RCU implementation rcu: Make RCU able to tolerate undefined CONFIG_RCU_KTHREAD_PRIO rcu: Make RCU able to tolerate undefined CONFIG_RCU_FANOUT_LEAF ...
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/locktorture.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index ec8cce259779..32244186f1f2 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -122,12 +122,12 @@ static int torture_lock_busted_write_lock(void)
122 122
123static void torture_lock_busted_write_delay(struct torture_random_state *trsp) 123static void torture_lock_busted_write_delay(struct torture_random_state *trsp)
124{ 124{
125 const unsigned long longdelay_us = 100; 125 const unsigned long longdelay_ms = 100;
126 126
127 /* We want a long delay occasionally to force massive contention. */ 127 /* We want a long delay occasionally to force massive contention. */
128 if (!(torture_random(trsp) % 128 if (!(torture_random(trsp) %
129 (cxt.nrealwriters_stress * 2000 * longdelay_us))) 129 (cxt.nrealwriters_stress * 2000 * longdelay_ms)))
130 mdelay(longdelay_us); 130 mdelay(longdelay_ms);
131#ifdef CONFIG_PREEMPT 131#ifdef CONFIG_PREEMPT
132 if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000))) 132 if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
133 preempt_schedule(); /* Allow test to be preempted. */ 133 preempt_schedule(); /* Allow test to be preempted. */
@@ -160,14 +160,14 @@ static int torture_spin_lock_write_lock(void) __acquires(torture_spinlock)
160static void torture_spin_lock_write_delay(struct torture_random_state *trsp) 160static void torture_spin_lock_write_delay(struct torture_random_state *trsp)
161{ 161{
162 const unsigned long shortdelay_us = 2; 162 const unsigned long shortdelay_us = 2;
163 const unsigned long longdelay_us = 100; 163 const unsigned long longdelay_ms = 100;
164 164
165 /* We want a short delay mostly to emulate likely code, and 165 /* We want a short delay mostly to emulate likely code, and
166 * we want a long delay occasionally to force massive contention. 166 * we want a long delay occasionally to force massive contention.
167 */ 167 */
168 if (!(torture_random(trsp) % 168 if (!(torture_random(trsp) %
169 (cxt.nrealwriters_stress * 2000 * longdelay_us))) 169 (cxt.nrealwriters_stress * 2000 * longdelay_ms)))
170 mdelay(longdelay_us); 170 mdelay(longdelay_ms);
171 if (!(torture_random(trsp) % 171 if (!(torture_random(trsp) %
172 (cxt.nrealwriters_stress * 2 * shortdelay_us))) 172 (cxt.nrealwriters_stress * 2 * shortdelay_us)))
173 udelay(shortdelay_us); 173 udelay(shortdelay_us);
@@ -309,7 +309,7 @@ static int torture_rwlock_read_lock_irq(void) __acquires(torture_rwlock)
309static void torture_rwlock_read_unlock_irq(void) 309static void torture_rwlock_read_unlock_irq(void)
310__releases(torture_rwlock) 310__releases(torture_rwlock)
311{ 311{
312 write_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags); 312 read_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
313} 313}
314 314
315static struct lock_torture_ops rw_lock_irq_ops = { 315static struct lock_torture_ops rw_lock_irq_ops = {