aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/update.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-08-21 03:45:19 -0400
committerIngo Molnar <mingo@kernel.org>2017-08-21 03:45:19 -0400
commit94edf6f3c20c9c8ee301bde04150a91bab4bf32c (patch)
tree4a2af658258cf42fde24c1224e44c3e6a18c2792 /kernel/rcu/update.c
parentd5da6457bfadf64ff78f1816ae8329dbbba19513 (diff)
parent656e7c0c0a2e8d899f87fd7f081ea7a711146604 (diff)
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU updates from Paul E. McKenney: - Removal of spin_unlock_wait() - SRCU updates - Torture-test updates - Documentation updates - Miscellaneous fixes - CPU-hotplug fixes - Miscellaneous non-RCU fixes Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/rcu/update.c')
-rw-r--r--kernel/rcu/update.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 00e77c470017..5033b66d2753 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -568,7 +568,7 @@ static DECLARE_WAIT_QUEUE_HEAD(rcu_tasks_cbs_wq);
568static DEFINE_RAW_SPINLOCK(rcu_tasks_cbs_lock); 568static DEFINE_RAW_SPINLOCK(rcu_tasks_cbs_lock);
569 569
570/* Track exiting tasks in order to allow them to be waited for. */ 570/* Track exiting tasks in order to allow them to be waited for. */
571DEFINE_SRCU(tasks_rcu_exit_srcu); 571DEFINE_STATIC_SRCU(tasks_rcu_exit_srcu);
572 572
573/* Control stall timeouts. Disable with <= 0, otherwise jiffies till stall. */ 573/* Control stall timeouts. Disable with <= 0, otherwise jiffies till stall. */
574#define RCU_TASK_STALL_TIMEOUT (HZ * 60 * 10) 574#define RCU_TASK_STALL_TIMEOUT (HZ * 60 * 10)
@@ -875,6 +875,22 @@ static void rcu_spawn_tasks_kthread(void)
875 mutex_unlock(&rcu_tasks_kthread_mutex); 875 mutex_unlock(&rcu_tasks_kthread_mutex);
876} 876}
877 877
878/* Do the srcu_read_lock() for the above synchronize_srcu(). */
879void exit_tasks_rcu_start(void)
880{
881 preempt_disable();
882 current->rcu_tasks_idx = __srcu_read_lock(&tasks_rcu_exit_srcu);
883 preempt_enable();
884}
885
886/* Do the srcu_read_unlock() for the above synchronize_srcu(). */
887void exit_tasks_rcu_finish(void)
888{
889 preempt_disable();
890 __srcu_read_unlock(&tasks_rcu_exit_srcu, current->rcu_tasks_idx);
891 preempt_enable();
892}
893
878#endif /* #ifdef CONFIG_TASKS_RCU */ 894#endif /* #ifdef CONFIG_TASKS_RCU */
879 895
880#ifndef CONFIG_TINY_RCU 896#ifndef CONFIG_TINY_RCU