Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423250
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier |
| Date | 2016-06-15 19:20 +0200 |
| Message-ID | <rKmDU-5r2-19@gated-at.bofh.it> (permalink) |
| References | <rK5jH-2zl-5@gated-at.bofh.it> <rK5jH-2zl-3@gated-at.bofh.it> <rKmkx-52w-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jun 15, 2016 at 09:56:59AM -0700, Davidlohr Bueso wrote:
> On Tue, 14 Jun 2016, Waiman Long wrote:
> >+++ b/kernel/locking/osq_lock.c
> >@@ -115,7 +115,7 @@ bool osq_lock(struct optimistic_spin_queue *lock)
> > * cmpxchg in an attempt to undo our queueing.
> > */
> >
> >- while (!READ_ONCE(node->locked)) {
> >+ while (!smp_load_acquire(&node->locked)) {
>
> Hmm this being a polling path, that barrier can get pretty expensive and
> last I checked it was unnecessary:
I think he'll go rely on it later on.
In any case, its fairly simple to cure, just add
smp_acquire__after_ctrl_dep() at the end. If we bail because
need_resched() we don't need the acquire I think.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Waiman Long <Waiman.Long@hpe.com> - 2016-06-15 00:50 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Boqun Feng <boqun.feng@gmail.com> - 2016-06-15 10:10 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Peter Zijlstra <peterz@infradead.org> - 2016-06-15 19:20 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Boqun Feng <boqun.feng@gmail.com> - 2016-06-16 04:20 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Will Deacon <will.deacon@arm.com> - 2016-06-16 12:20 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Boqun Feng <boqun.feng@gmail.com> - 2016-06-17 02:50 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Will Deacon <will.deacon@arm.com> - 2016-06-17 17:50 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Boqun Feng <boqun.feng@gmail.com> - 2016-06-18 10:50 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Will Deacon <will.deacon@arm.com> - 2016-06-20 10:10 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Davidlohr Bueso <dave@stgolabs.net> - 2016-06-15 19:00 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Peter Zijlstra <peterz@infradead.org> - 2016-06-15 19:20 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Davidlohr Bueso <dave@stgolabs.net> - 2016-06-15 20:30 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Peter Zijlstra <peterz@infradead.org> - 2016-06-15 20:50 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Davidlohr Bueso <dave@stgolabs.net> - 2016-06-15 21:00 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Davidlohr Bueso <dave@stgolabs.net> - 2016-06-17 03:20 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Davidlohr Bueso <dave@stgolabs.net> - 2016-06-17 18:30 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Davidlohr Bueso <dave@stgolabs.net> - 2016-06-17 18:50 +0200
Re: [RFC PATCH-tip v2 1/6] locking/osq: Make lock/unlock proper acquire/release barrier Peter Zijlstra <peterz@infradead.org> - 2016-06-16 00:00 +0200
csiph-web