]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Remove local_irq_disable() in rcu_preempt_note_context_switch()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 14 Aug 2014 23:01:53 +0000 (16:01 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 7 Sep 2014 23:27:34 +0000 (16:27 -0700)
commit346b841c6c9fd85f0b9d1f1c452b0632c4332771
treea8f715a674a036b1b7500a16ea11381d40659e42
parent766ae323048bef44d1cd343979d42679f6be9060
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>
include/linux/init_task.h
include/linux/sched.h
kernel/rcu/tree_plugin.h
kernel/rcu/update.c