Loading kernel/locking/mutex.c +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <linux/interrupt.h> #include <linux/debug_locks.h> #include <linux/osq_lock.h> #include <linux/delay.h> #ifdef CONFIG_DEBUG_MUTEXES # include "mutex-debug.h" Loading Loading @@ -555,6 +556,17 @@ mutex_optimistic_spin(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, * values at the cost of a few extra spins. */ cpu_relax(); /* * On arm systems, we must slow down the waiter's repeated * aquisition of spin_mlock and atomics on the lock count, or * we risk starving out a thread attempting to release the * mutex. The mutex slowpath release must take spin lock * wait_lock. This spin lock can share a monitor with the * other waiter atomics in the mutex data structure, so must * take care to rate limit the waiters. */ udelay(1); } if (!waiter) Loading Loading
kernel/locking/mutex.c +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <linux/interrupt.h> #include <linux/debug_locks.h> #include <linux/osq_lock.h> #include <linux/delay.h> #ifdef CONFIG_DEBUG_MUTEXES # include "mutex-debug.h" Loading Loading @@ -555,6 +556,17 @@ mutex_optimistic_spin(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, * values at the cost of a few extra spins. */ cpu_relax(); /* * On arm systems, we must slow down the waiter's repeated * aquisition of spin_mlock and atomics on the lock count, or * we risk starving out a thread attempting to release the * mutex. The mutex slowpath release must take spin lock * wait_lock. This spin lock can share a monitor with the * other waiter atomics in the mutex data structure, so must * take care to rate limit the waiters. */ udelay(1); } if (!waiter) Loading