Loading Documentation/RCU/stallwarn.txt +7 −0 Original line number Diff line number Diff line Loading @@ -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() 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. This can result in the "All QSes seen" console-log message. This message will include information on when the kthread last Loading Documentation/RCU/torture.txt +13 −26 Original line number Diff line number Diff line Loading @@ -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: "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(). "rcu_sync": rcu_read_lock(), rcu_read_unlock(), and synchronize_rcu(). "rcu_expedited": rcu_read_lock(), rcu_read_unlock(), and synchronize_rcu_expedited(). "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(), along with expedited, synchronous, and polling variants. "rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and call_rcu_bh(). "rcu_bh_sync": rcu_read_lock_bh(), rcu_read_unlock_bh(), and synchronize_rcu_bh(). call_rcu_bh(), along with expedited and synchronous variants. "rcu_bh_expedited": rcu_read_lock_bh(), rcu_read_unlock_bh(), and synchronize_rcu_bh_expedited(). "rcu_busted": This tests an intentionally incorrect version of RCU in order to help test rcutorture itself. "srcu": srcu_read_lock(), srcu_read_unlock() and call_srcu(). "srcu_sync": srcu_read_lock(), srcu_read_unlock() and synchronize_srcu(). "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and synchronize_srcu_expedited(). call_srcu(), along with expedited and synchronous variants. "sched": preempt_disable(), preempt_enable(), and call_rcu_sched(). "sched_sync": preempt_disable(), preempt_enable(), and synchronize_sched(). call_rcu_sched(), along with expedited, synchronous, and polling variants. "sched_expedited": preempt_disable(), preempt_enable(), and synchronize_sched_expedited(). "tasks": voluntary context switch and call_rcu_tasks(), along with expedited and synchronous variants. Defaults to "rcu". Loading Documentation/RCU/whatisRCU.txt +3 −3 Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt. }; 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 Loading @@ -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); 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->a = new_a; rcu_assign_pointer(gbl_foo, new_fp); Loading Loading @@ -487,7 +487,7 @@ The foo_update_a() function might then be written as follows: new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); 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->a = new_a; rcu_assign_pointer(gbl_foo, new_fp); Loading Documentation/locking/locktorture.txt +3 −0 Original line number Diff line number Diff line Loading @@ -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 "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. torture_runnable Start locktorture at boot time in the case where the Loading Documentation/memory-barriers.txt +11 −1 Original line number Diff line number Diff line Loading @@ -1710,6 +1710,17 @@ There are some more advanced barrier functions: 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_rmb(); Loading Loading @@ -1789,7 +1800,6 @@ The Linux kernel has a number of locking constructs: (*) mutexes (*) semaphores (*) R/W semaphores (*) RCU In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations for each construct. These operations all imply certain barriers: Loading Loading
Documentation/RCU/stallwarn.txt +7 −0 Original line number Diff line number Diff line Loading @@ -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() 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. This can result in the "All QSes seen" console-log message. This message will include information on when the kthread last Loading
Documentation/RCU/torture.txt +13 −26 Original line number Diff line number Diff line Loading @@ -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: "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(). "rcu_sync": rcu_read_lock(), rcu_read_unlock(), and synchronize_rcu(). "rcu_expedited": rcu_read_lock(), rcu_read_unlock(), and synchronize_rcu_expedited(). "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(), along with expedited, synchronous, and polling variants. "rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and call_rcu_bh(). "rcu_bh_sync": rcu_read_lock_bh(), rcu_read_unlock_bh(), and synchronize_rcu_bh(). call_rcu_bh(), along with expedited and synchronous variants. "rcu_bh_expedited": rcu_read_lock_bh(), rcu_read_unlock_bh(), and synchronize_rcu_bh_expedited(). "rcu_busted": This tests an intentionally incorrect version of RCU in order to help test rcutorture itself. "srcu": srcu_read_lock(), srcu_read_unlock() and call_srcu(). "srcu_sync": srcu_read_lock(), srcu_read_unlock() and synchronize_srcu(). "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and synchronize_srcu_expedited(). call_srcu(), along with expedited and synchronous variants. "sched": preempt_disable(), preempt_enable(), and call_rcu_sched(). "sched_sync": preempt_disable(), preempt_enable(), and synchronize_sched(). call_rcu_sched(), along with expedited, synchronous, and polling variants. "sched_expedited": preempt_disable(), preempt_enable(), and synchronize_sched_expedited(). "tasks": voluntary context switch and call_rcu_tasks(), along with expedited and synchronous variants. Defaults to "rcu". Loading
Documentation/RCU/whatisRCU.txt +3 −3 Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt. }; 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 Loading @@ -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); 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->a = new_a; rcu_assign_pointer(gbl_foo, new_fp); Loading Loading @@ -487,7 +487,7 @@ The foo_update_a() function might then be written as follows: new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); 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->a = new_a; rcu_assign_pointer(gbl_foo, new_fp); Loading
Documentation/locking/locktorture.txt +3 −0 Original line number Diff line number Diff line Loading @@ -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 "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. torture_runnable Start locktorture at boot time in the case where the Loading
Documentation/memory-barriers.txt +11 −1 Original line number Diff line number Diff line Loading @@ -1710,6 +1710,17 @@ There are some more advanced barrier functions: 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_rmb(); Loading Loading @@ -1789,7 +1800,6 @@ The Linux kernel has a number of locking constructs: (*) mutexes (*) semaphores (*) R/W semaphores (*) RCU In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations for each construct. These operations all imply certain barriers: Loading