Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1678065
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT PULL rcu/next] RCU commits for 4.13 |
| Date | 2017-06-29 20:50 +0200 |
| Message-ID | <tXMFQ-2IU-23@gated-at.bofh.it> (permalink) |
| References | <tXpq2-t5-157@gated-at.bofh.it> <tXrBo-237-25@gated-at.bofh.it> <tXvvl-rh-27@gated-at.bofh.it> <tXvvl-rh-25@gated-at.bofh.it> <tXFXJ-6YG-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jun 29, 2017 at 12:38:48PM +0100, Will Deacon wrote: > [turns out I've not been on cc for this thread, but Jade pointed me to it > and I see my name came up at some point!] My bad for not having you Cc: on the original patch, apologies! > On Wed, Jun 28, 2017 at 05:05:46PM -0700, Linus Torvalds wrote: > > On Wed, Jun 28, 2017 at 4:54 PM, Paul E. McKenney > > <paulmck@linux.vnet.ibm.com> wrote: > > > > > > Linus, are you dead-set against defining spin_unlock_wait() to be > > > spin_lock + spin_unlock? For example, is the current x86 implementation > > > of spin_unlock_wait() really a non-negotiable hard requirement? Or > > > would you be willing to live with the spin_lock + spin_unlock semantics? > > > > So I think the "same as spin_lock + spin_unlock" semantics are kind of insane. > > > > One of the issues is that the same as "spin_lock + spin_unlock" is > > basically now architecture-dependent. Is it really the > > architecture-dependent ordering you want to define this as? > > > > So I just think it's a *bad* definition. If somebody wants something > > that is exactly equivalent to spin_lock+spin_unlock, then dammit, just > > do *THAT*. It's completely pointless to me to define > > spin_unlock_wait() in those terms. > > > > And if it's not equivalent to the *architecture* behavior of > > spin_lock+spin_unlock, then I think it should be descibed in terms > > that aren't about the architecture implementation (so you shouldn't > > describe it as "spin_lock+spin_unlock", you should describe it in > > terms of memory barrier semantics. > > > > And if we really have to use the spin_lock+spinunlock semantics for > > this, then what is the advantage of spin_unlock_wait at all, if it > > doesn't fundamentally avoid some locking overhead of just taking the > > spinlock in the first place? > > Just on this point -- the arm64 code provides the same ordering semantics > as you would get from a lock;unlock sequence, but we can optimise that > when compared to an actual lock;unlock sequence because we don't need to > wait in turn for our ticket. I suspect something similar could be done > if/when we move to qspinlocks. > > Whether or not this is actually worth optimising is another question, but > it is worth noting that unlock_wait can be implemented more cheaply than > lock;unlock, whilst providing the same ordering guarantees (if that's > really what we want -- see my reply to Paul). > > Simplicity tends to be my preference, so ripping this out would suit me > best ;) Creating the series to do just that, with you on Cc this time! Thanx, Paul
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-27 23:00 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-27 23:50 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-28 01:40 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Alan Stern <stern@rowland.harvard.edu> - 2017-06-28 17:40 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-28 20:00 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Alan Stern <stern@rowland.harvard.edu> - 2017-06-28 22:20 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 02:30 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-29 02:50 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Boqun Feng <boqun.feng@gmail.com> - 2017-06-29 05:20 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-29 20:50 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Will Deacon <will.deacon@arm.com> - 2017-06-29 13:40 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Will Deacon <will.deacon@arm.com> - 2017-06-29 13:40 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Alan Stern <stern@rowland.harvard.edu> - 2017-06-29 18:00 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-29 20:20 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Boqun Feng <boqun.feng@gmail.com> - 2017-06-30 04:50 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-30 06:10 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 Boqun Feng <boqun.feng@gmail.com> - 2017-06-30 07:20 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-30 19:40 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-29 20:50 +0200
Re: [GIT PULL rcu/next] RCU commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-29 02:30 +0200
csiph-web