Re: [PATCH] locking/osq: Drop the overload of osq lock
From: Peter Zijlstra
Date: Mon Jun 27 2016 - 03:55:39 EST
On Sun, Jun 26, 2016 at 12:59:01PM +0800, panxinhui wrote:
>
> > å 2016å6æ26æï03:12ïPeter Zijlstra <peterz@xxxxxxxxxxxxx> åéï
> >
> > On Sun, Jun 26, 2016 at 01:27:51AM +0800, panxinhui wrote:
> >
> >> by the way I still think mutex_unlock has a big overload too.
> >
> > Do you mean overhead?
> >
> oh, maybe you are right.
> mutex_unlock âs implementation uses inc_return variant on ppc, and
> thatâs expensive. I am thinking of using cmpxchg instead.
That statement doesn't make any sense. PPC is an LL/SC arch, inc_return
and cmpxchg are the 'same' LL/SC loop.