Skip to content
Commit 38a86a34 authored by Guo Ren's avatar Guo Ren
Browse files

asm-generic: ticket-lock: Optimize arch_spin_value_unlocked



The arch_spin_value_unlocked would cause an unnecessary memory
access to the contended value. Although it won't cause a significant
performance gap in most architectures, the arch_spin_value_unlocked
argument contains enough information. Thus, remove unnecessary
atomic_read in arch_spin_value_unlocked().

The caller of arch_spin_value_unlocked() could benefit from this
change. Currently, the only caller is lockref.

Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Acked-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
parent b17aefd2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment