Re: [PATCH -tip/master v2] locking/mutex: Refactor optimistic spinning code

2014-07-28 Thread Davidlohr Bueso
On Mon, 2014-07-28 at 20:41 -0700, Jason Low wrote: > On Mon, 2014-07-28 at 19:55 -0700, Davidlohr Bueso wrote: > > +static bool mutex_optimistic_spin(struct mutex *lock, > > + struct ww_acquire_ctx *ww_ctx, const bool > > use_ww_ctx) > > +{ > > + struct task_struct *

Re: [PATCH -tip/master v2] locking/mutex: Refactor optimistic spinning code

2014-07-28 Thread Jason Low
On Mon, 2014-07-28 at 19:55 -0700, Davidlohr Bueso wrote: > +static bool mutex_optimistic_spin(struct mutex *lock, > + struct ww_acquire_ctx *ww_ctx, const bool > use_ww_ctx) > +{ > + struct task_struct *task = current; > + > + if (!mutex_can_spin_on_owner(loc