Skip to content
Commit 6c2787f2 authored by Yanfei Xu's avatar Yanfei Xu Committed by Peter Zijlstra
Browse files

locking: Remove rcu_read_{,un}lock() for preempt_{dis,en}able()



preempt_disable/enable() is equal to RCU read-side crital section, and
the spinning codes in mutex and rwsem could ensure that the preemption
is disabled. So let's remove the unnecessary rcu_read_lock/unlock for
saving some cycles in hot codes.

Signed-off-by: default avatarYanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Link: https://lore.kernel.org/r/20211013134154.1085649-2-yanfei.xu@windriver.com
parent 7cdacc5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment