From: Jason Low <jason.low2@hpe.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: jason.low2@hp.com, Waiman Long <waiman.long@hpe.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Terry Rudd <terry.rudd@hpe.com>,
Scott J Norton <scott.norton@hpe.com>
Subject: Re: [PATCH] locking/mutex: Set and clear owner using WRITE_ONCE()
Date: Mon, 23 May 2016 14:49:55 -0700 [thread overview]
Message-ID: <1464040195.2519.5.camel@j-VirtualBox> (raw)
In-Reply-To: <20160523213123.c5qdhz23xy5ziqik@linux-uzut.site>
On Mon, 2016-05-23 at 14:31 -0700, Davidlohr Bueso wrote:
> 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)
Oh right, so then the mutex_set_owner() call in mutex_lock() doesn't
really matter. I'll update the patch to remove the use of WRITE_ONCE for
the debug case then, and add the comments about why it is different as
suggested.
Thanks,
Jason
prev parent reply other threads:[~2016-05-23 21:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 22:23 [PATCH] locking/mutex: Set and clear owner using WRITE_ONCE() Jason Low
2016-05-20 1:19 ` Davidlohr Bueso
2016-05-20 20:27 ` Waiman Long
2016-05-20 22:09 ` Jason Low
2016-05-21 1:00 ` Davidlohr Bueso
2016-05-21 4:09 ` Waiman Long
2016-05-23 20:40 ` Jason Low
2016-05-23 21:31 ` Davidlohr Bueso
2016-05-23 21:49 ` Jason Low [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464040195.2519.5.camel@j-VirtualBox \
--to=jason.low2@hpe.com \
--cc=dave@stgolabs.net \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=scott.norton@hpe.com \
--cc=terry.rudd@hpe.com \
--cc=waiman.long@hpe.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.