diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-08-14 19:01:53 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-09-07 19:27:34 -0400 |
commit | 1d082fd061884a587c490c4fc8a2056ce1e47624 (patch) | |
tree | a8f715a674a036b1b7500a16ea11381d40659e42 /include/linux/init_task.h | |
parent | 4ff475ed4cf61a7f56bbfbc424147189d0022b38 (diff) |
rcu: Remove local_irq_disable() in rcu_preempt_note_context_switch()
The rcu_preempt_note_context_switch() function is on a scheduling fast
path, so it would be good to avoid disabling irqs. The reason that irqs
are disabled is to synchronize process-level and irq-handler access to
the task_struct ->rcu_read_unlock_special bitmask. This commit therefore
makes ->rcu_read_unlock_special instead be a union of bools with a short
allowing single-access checks in RCU's __rcu_read_unlock(). This results
in the process-level and irq-handler accesses being simple loads and
stores, so that irqs need no longer be disabled. This commit therefore
removes the irq disabling from rcu_preempt_note_context_switch().
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r-- | include/linux/init_task.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 03b274873b06..77fc43f8fb72 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -111,7 +111,7 @@ extern struct group_info init_groups; | |||
111 | #ifdef CONFIG_PREEMPT_RCU | 111 | #ifdef CONFIG_PREEMPT_RCU |
112 | #define INIT_TASK_RCU_PREEMPT(tsk) \ | 112 | #define INIT_TASK_RCU_PREEMPT(tsk) \ |
113 | .rcu_read_lock_nesting = 0, \ | 113 | .rcu_read_lock_nesting = 0, \ |
114 | .rcu_read_unlock_special = 0, \ | 114 | .rcu_read_unlock_special.s = 0, \ |
115 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ | 115 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ |
116 | INIT_TASK_RCU_TREE_PREEMPT() | 116 | INIT_TASK_RCU_TREE_PREEMPT() |
117 | #else | 117 | #else |