[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160523213123.c5qdhz23xy5ziqik@linux-uzut.site>
Date: Mon, 23 May 2016 14:31:23 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Jason Low <jason.low2@....com>
Cc: jason.low2@...com, Waiman Long <waiman.long@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Terry Rudd <terry.rudd@....com>,
Scott J Norton <scott.norton@....com>
Subject: Re: [PATCH] locking/mutex: Set and clear owner using WRITE_ONCE()
On Mon, 23 May 2016, Jason Low wrote:
>On Fri, 2016-05-20 at 18:00 -0700, Davidlohr Bueso wrote:
>> On Fri, 20 May 2016, Waiman Long wrote:
>>
>> >I think mutex-debug.h also needs similar changes for completeness.
>>
>> Maybe, but given that with debug the wait_lock is unavoidable, doesn't
>> this send the wrong message?
>
>The mutex_set_owner() and mutex_clear_owner() can still get called in
>the fastpath without the wait_lock for the debug case too correct?
The fastpath is a nop, see mutex-null:
#define __mutex_fastpath_lock(count, fail_fn) fail_fn(count)
In anycase, if there were a fastpath, that would at least have an
ACQUIRE barrier (unless you set ->owner it before it or something
weird). But this isn't the case, so debug should be safe afaict.
Thanks,
Davidlohr
Powered by blists - more mailing lists