Lines Matching refs:lock
26 transitions that can occur during the lifetime of a lock:
34 a pointer to the lock task owner (->owner) as well as a spinner MCS
35 lock (->osq), both described below in (ii).
38 taken, depending on the state of the lock:
40 (i) fastpath: tries to atomically acquire the lock by decrementing the
46 e21: f0 ff 0b lock decl (%rbx)
52 bc8: f0 ff 07 lock incl (%rdi)
57 while the lock owner is running and there are no other tasks ready
59 that if the lock owner is running, it is likely to release the lock
60 soon. The mutex spinners are queued up using MCS lock so that only
63 The MCS lock (proposed by Mellor-Crummey and Scott) is a simple spinlock
65 to acquire the lock spinning on a local variable. It avoids expensive
67 incur. An MCS-like lock is specially tailored for optimistic spinning
68 for sleeping lock implementation. An important feature of the customized
69 MCS lock is that it has the extra property that spinners are able to exit
73 obtaining the MCS lock.
76 (iii) slowpath: last resort, if the lock is still unable to be acquired,
83 the performance of this lock has been seen to significantly improve a
104 features that make lock debugging easier and faster:
125 void mutex_lock(struct mutex *lock);
126 void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
127 int mutex_trylock(struct mutex *lock);
130 int mutex_lock_interruptible_nested(struct mutex *lock,
132 int mutex_lock_interruptible(struct mutex *lock);
135 int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
138 void mutex_unlock(struct mutex *lock);
141 int mutex_is_locked(struct mutex *lock);
149 for the largest lock in the kernel. Larger structure sizes mean more
156 region prevents the lock from being shared, always prefer them to any other