lkml.org 
[lkml]   [2014]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 08/17] rcu: Allow post-unlock reference for rt_mutex
On 07/08/2014 06:38 AM, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
>
> The current approach to RCU priority boosting uses an rt_mutex strictly
> for its priority-boosting side effects. The rt_mutex_init_proxy_locked()
> function is used by the booster to initialize the lock as held by the
> boostee. The booster then uses rt_mutex_lock() to acquire this rt_mutex,
> which priority-boosts the boostee. When the boostee reaches the end
> of its outermost RCU read-side critical section, it checks a field in
> its task structure to see whether it has been boosted, and, if so, uses
> rt_mutex_unlock() to release the rt_mutex. The booster can then go on
> to boost the next task that is blocking the current RCU grace period.
>
> But reasonable implementations of rt_mutex_unlock() might result in the
> boostee referencing the rt_mutex's data after releasing it.

XXXX_unlock(lock_ptr) should not reference to the lock_ptr after it has unlocked the lock. (*)
So I think this patch is unneeded. Although its adding overhead is at slow-patch,
but it adds REVIEW-burden.

And although the original rt_mutex_unlock() violates the rule(*) when the fast-cmpxchg-path,
but it is fixed now.

It is the lock-subsystem's responsible to do this. I prefer to add the wait_for_complete()
stuff until the future when the boostee needs to re-access the booster after rt_mutex_unlock()
instead of now.

Thanks,
Lai


\
 
 \ /
  Last update: 2014-07-09 04:22    [W:0.207 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site