Re: [PATCH -tip] locking/rtmutex: Reduce top-waiter blocking on a lock

2016-09-26 Thread Waiman Long
On 09/23/2016 09:28 PM, Davidlohr Bueso wrote: +#ifdef CONFIG_RT_MUTEX_SPIN_ON_OWNER +static bool rt_mutex_spin_on_owner(struct rt_mutex *lock, + struct task_struct *owner) +{ +bool ret = true; + +/* + * The last owner could have just released the lock, + * imme

[PATCH -tip] locking/rtmutex: Reduce top-waiter blocking on a lock

2016-09-23 Thread Davidlohr Bueso
By applying well known spin-on-lock-owner techniques, we can avoid the blocking overhead during the process of when the task is trying to take the rtmutex. The idea is that as long as the owner is running, there is a fair chance it'll release the lock soon, and thus a task trying to acquire the rt