diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-03 11:08:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-03 11:08:21 -0400 |
commit | fc6d0b037678f50014ef409c92c5bedc01208fcd (patch) | |
tree | b7de25e97b03c31ea6c5f2540f641b0be2c91832 /drivers/nfc/nfcsim.c | |
parent | 6e4664525b1db28f8c4e1130957f70a94c19213e (diff) | |
parent | bc08b449ee14ace4d869adaa1bb35a44ce68d775 (diff) |
Merge branch 'lockref' (locked reference counts)
Merge lockref infrastructure code by me and Waiman Long.
I already merged some of the preparatory patches that didn't actually do
any semantic changes earlier, but this merges the actual _reason_ for
those preparatory patches.
The "lockref" structure is a combination "spinlock and reference count"
that allows optimized reference count accesses. In particular, it
guarantees that the reference count will be updated AS IF the spinlock
was held, but using atomic accesses that cover both the reference count
and the spinlock words, we can often do the update without actually
having to take the lock.
This allows us to avoid the nastiest cases of spinlock contention on
large machines under heavy pathname lookup loads. When updating the
dentry reference counts on a large system, we'll still end up with the
cache line bouncing around, but that's much less noticeable than
actually having to spin waiting for the lock.
* lockref:
lockref: implement lockless reference count updates using cmpxchg()
lockref: uninline lockref helper functions
vfs: reimplement d_rcu_to_refcount() using lockref_get_or_lock()
vfs: use lockref_get_not_zero() for optimistic lockless dget_parent()
lockref: add 'lockref_get_or_lock() helper
Diffstat (limited to 'drivers/nfc/nfcsim.c')
0 files changed, 0 insertions, 0 deletions