[PATCH v3 2/5] mutex: Queue mutex spinners with MCS lock to reduce cacheline contention

2013-04-16 Thread Waiman Long
The current mutex spinning code (with MUTEX_SPIN_ON_OWNER option turned on) allow multiple tasks to spin on a single mutex concurrently. A potential problem with the current approach is that when the mutex becomes available, all the spinning tasks will try to acquire the mutex more or less

[PATCH v3 2/5] mutex: Queue mutex spinners with MCS lock to reduce cacheline contention

2013-04-16 Thread Waiman Long
The current mutex spinning code (with MUTEX_SPIN_ON_OWNER option turned on) allow multiple tasks to spin on a single mutex concurrently. A potential problem with the current approach is that when the mutex becomes available, all the spinning tasks will try to acquire the mutex more or less