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: Guo 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: Waiman Long <longman@redhat.com> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Please register or sign in to comment