Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623230

Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to sync_exp_work_done()

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to sync_exp_work_done()
Date 2017-04-13 20:00 +0200
Message-ID <tvRce-6mR-11@gated-at.bofh.it> (permalink)
References (3 earlier) <tvPDs-5oA-13@gated-at.bofh.it> <tvPN8-5sD-23@gated-at.bofh.it> <tvQg9-5H7-13@gated-at.bofh.it> <tvQzw-66m-19@gated-at.bofh.it> <tvR2y-6iE-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 13, 2017 at 10:39:51AM -0700, Paul E. McKenney wrote:

> Well, if there are no objections, I will fix up the smp_mb__before_atomic()
> and smp_mb__after_atomic() pieces.

Feel free.

> I suppose that one alternative is the new variant of kerneldoc, though
> very few of these functions have comment headers, let alone kerneldoc
> headers.  Which reminds me, the question of spin_unlock_wait() and
> spin_is_locked() semantics came up a bit ago.  Here is what I believe
> to be the case.  Does this match others' expectations?
> 
> o	spin_unlock_wait() semantics:
> 
> 	1.	Any access in any critical section prior to the
> 		spin_unlock_wait() is visible to all code following
> 		(in program order) the spin_unlock_wait().
> 
> 	2.	Any access prior (in program order) to the
> 		spin_unlock_wait() is visible to any critical
> 		section following the spin_unlock_wait().
> 
> o	spin_is_locked() semantics: Half of spin_unlock_wait(),
> 	but only if it returns false:
> 
> 	1.	Any access in any critical section prior to the
> 		spin_unlock_wait() is visible to all code following
> 		(in program order) the spin_unlock_wait().

Urgh.. yes those are pain. The best advise is to not use them.

  055ce0fd1b86 ("locking/qspinlock: Add comments")

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to sync_exp_work_done() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-12 19:00 +0200
  Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-13 11:20 +0200
    Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-13 11:40 +0200
    Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-13 18:20 +0200
      Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-13 18:30 +0200
        Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-13 19:00 +0200
          Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-13 19:20 +0200
            Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-13 19:50 +0200
              Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-13 20:00 +0200
                Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-13 20:10 +0200
                Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-20 01:30 +0200
                Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-20 01:30 +0200
                Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-20 13:20 +0200
                Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-20 17:10 +0200
                Re: [PATCH tip/core/rcu 07/13] rcu: Add smp_mb__after_atomic() to  sync_exp_work_done() Peter Zijlstra <peterz@infradead.org> - 2017-04-20 17:10 +0200

csiph-web