Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39cd2dd3 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

Merge branches 'doc.2015.10.06a', 'percpu-rwsem.2015.10.06a' and 'torture.2015.10.06a' into HEAD

doc.2015.10.06a:  Documentation updates.
percpu-rwsem.2015.10.06a:  Optimization of per-CPU reader-writer semaphores.
torture.2015.10.06a:  Torture-test updates.
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -205,6 +205,13 @@ o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the
	behavior, you might need to replace some of the cond_resched()
	behavior, you might need to replace some of the cond_resched()
	calls with calls to cond_resched_rcu_qs().
	calls with calls to cond_resched_rcu_qs().


o	Booting Linux using a console connection that is too slow to
	keep up with the boot-time console-message rate.  For example,
	a 115Kbaud serial console can be -way- too slow to keep up
	with boot-time message rates, and will frequently result in
	RCU CPU stall warning messages.  Especially if you have added
	debug printk()s.

o	Anything that prevents RCU's grace-period kthreads from running.
o	Anything that prevents RCU's grace-period kthreads from running.
	This can result in the "All QSes seen" console-log message.
	This can result in the "All QSes seen" console-log message.
	This message will include information on when the kthread last
	This message will include information on when the kthread last
+13 −26
Original line number Original line Diff line number Diff line
@@ -166,40 +166,27 @@ test_no_idle_hz Whether or not to test the ability of RCU to operate in


torture_type	The type of RCU to test, with string values as follows:
torture_type	The type of RCU to test, with string values as follows:


		"rcu":  rcu_read_lock(), rcu_read_unlock() and call_rcu().
		"rcu":  rcu_read_lock(), rcu_read_unlock() and call_rcu(),

			along with expedited, synchronous, and polling
		"rcu_sync":  rcu_read_lock(), rcu_read_unlock(), and
			variants.
			synchronize_rcu().

		"rcu_expedited": rcu_read_lock(), rcu_read_unlock(), and
			synchronize_rcu_expedited().


		"rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and
		"rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and
			call_rcu_bh().
			call_rcu_bh(), along with expedited and synchronous

			variants.
		"rcu_bh_sync": rcu_read_lock_bh(), rcu_read_unlock_bh(),
			and synchronize_rcu_bh().


		"rcu_bh_expedited": rcu_read_lock_bh(), rcu_read_unlock_bh(),
		"rcu_busted": This tests an intentionally incorrect version
			and synchronize_rcu_bh_expedited().
			of RCU in order to help test rcutorture itself.


		"srcu": srcu_read_lock(), srcu_read_unlock() and
		"srcu": srcu_read_lock(), srcu_read_unlock() and
			call_srcu().
			call_srcu(), along with expedited and

			synchronous variants.
		"srcu_sync": srcu_read_lock(), srcu_read_unlock() and
			synchronize_srcu().

		"srcu_expedited": srcu_read_lock(), srcu_read_unlock() and
			synchronize_srcu_expedited().


		"sched": preempt_disable(), preempt_enable(), and
		"sched": preempt_disable(), preempt_enable(), and
			call_rcu_sched().
			call_rcu_sched(), along with expedited,

			synchronous, and polling variants.
		"sched_sync": preempt_disable(), preempt_enable(), and
			synchronize_sched().


		"sched_expedited": preempt_disable(), preempt_enable(), and
		"tasks": voluntary context switch and call_rcu_tasks(),
			synchronize_sched_expedited().
			along with expedited and synchronous variants.


		Defaults to "rcu".
		Defaults to "rcu".


+3 −3
Original line number Original line Diff line number Diff line
@@ -364,7 +364,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.
	};
	};
	DEFINE_SPINLOCK(foo_mutex);
	DEFINE_SPINLOCK(foo_mutex);


	struct foo *gbl_foo;
	struct foo __rcu *gbl_foo;


	/*
	/*
	 * Create a new struct foo that is the same as the one currently
	 * Create a new struct foo that is the same as the one currently
@@ -386,7 +386,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.


		new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
		new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
		spin_lock(&foo_mutex);
		spin_lock(&foo_mutex);
		old_fp = gbl_foo;
		old_fp = rcu_dereference_protected(gbl_foo, lockdep_is_held(&foo_mutex));
		*new_fp = *old_fp;
		*new_fp = *old_fp;
		new_fp->a = new_a;
		new_fp->a = new_a;
		rcu_assign_pointer(gbl_foo, new_fp);
		rcu_assign_pointer(gbl_foo, new_fp);
@@ -487,7 +487,7 @@ The foo_update_a() function might then be written as follows:


		new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
		new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
		spin_lock(&foo_mutex);
		spin_lock(&foo_mutex);
		old_fp = gbl_foo;
		old_fp = rcu_dereference_protected(gbl_foo, lockdep_is_held(&foo_mutex));
		*new_fp = *old_fp;
		*new_fp = *old_fp;
		new_fp->a = new_a;
		new_fp->a = new_a;
		rcu_assign_pointer(gbl_foo, new_fp);
		rcu_assign_pointer(gbl_foo, new_fp);
+3 −0
Original line number Original line Diff line number Diff line
@@ -52,6 +52,9 @@ torture_type Type of lock to torture. By default, only spinlocks will


		     o "mutex_lock": mutex_lock() and mutex_unlock() pairs.
		     o "mutex_lock": mutex_lock() and mutex_unlock() pairs.


		     o "rtmutex_lock": rtmutex_lock() and rtmutex_unlock()
				       pairs. Kernel must have CONFIG_RT_MUTEX=y.

		     o "rwsem_lock": read/write down() and up() semaphore pairs.
		     o "rwsem_lock": read/write down() and up() semaphore pairs.


torture_runnable  Start locktorture at boot time in the case where the
torture_runnable  Start locktorture at boot time in the case where the
+11 −1
Original line number Original line Diff line number Diff line
@@ -1710,6 +1710,17 @@ There are some more advanced barrier functions:
     operations" subsection for information on where to use these.
     operations" subsection for information on where to use these.




 (*) lockless_dereference();
     This can be thought of as a pointer-fetch wrapper around the
     smp_read_barrier_depends() data-dependency barrier.

     This is also similar to rcu_dereference(), but in cases where
     object lifetime is handled by some mechanism other than RCU, for
     example, when the objects removed only when the system goes down.
     In addition, lockless_dereference() is used in some data structures
     that can be used both with and without RCU.


 (*) dma_wmb();
 (*) dma_wmb();
 (*) dma_rmb();
 (*) dma_rmb();


@@ -1789,7 +1800,6 @@ The Linux kernel has a number of locking constructs:
 (*) mutexes
 (*) mutexes
 (*) semaphores
 (*) semaphores
 (*) R/W semaphores
 (*) R/W semaphores
 (*) RCU


In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations
In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations
for each construct.  These operations all imply certain barriers:
for each construct.  These operations all imply certain barriers:
Loading