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


Groups > linux.kernel > #1411233

Re: [PATCH -v3 3/8] locking: Introduce smp_acquire__after_ctrl_dep

From Boqun Feng <boqun.feng@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH -v3 3/8] locking: Introduce smp_acquire__after_ctrl_dep
Date 2016-06-01 15:50 +0200
Message-ID <rFeGZ-BQ-7@gated-at.bofh.it> (permalink)
References <rEOCR-11o-9@gated-at.bofh.it> <rEOCT-11o-55@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, May 31, 2016 at 11:41:37AM +0200, Peter Zijlstra wrote:
[snip]
> @@ -260,16 +260,6 @@ static void sem_rcu_free(struct rcu_head
>  }
>  
>  /*
> - * spin_unlock_wait() and !spin_is_locked() are not memory barriers, they
> - * are only control barriers.
> - * The code must pair with spin_unlock(&sem->lock) or
> - * spin_unlock(&sem_perm.lock), thus just the control barrier is insufficient.
> - *
> - * smp_rmb() is sufficient, as writes cannot pass the control barrier.
> - */
> -#define ipc_smp_acquire__after_spin_is_unlocked()	smp_rmb()
> -
> -/*
>   * Wait until all currently ongoing simple ops have completed.
>   * Caller must own sem_perm.lock.
>   * New simple ops cannot start, because simple ops first check
> @@ -292,7 +282,7 @@ static void sem_wait_array(struct sem_ar
>  		sem = sma->sem_base + i;
>  		spin_unlock_wait(&sem->lock);
>  	}
> -	ipc_smp_acquire__after_spin_is_unlocked();
> +	smp_acquire__after_ctrl_dep();

I wonder whether we can kill this barrier after updating
spin_unlock_wait() to ACQUIRE?

Regards,
Boqun

>  }
>  
>  /*

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


Thread

[PATCH -v3 0/8] spin_unlock_wait borkage and assorted bits Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
  [PATCH -v3 1/8] locking: Replace smp_cond_acquire with smp_cond_load_acquire Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
  [PATCH -v3 6/8] locking,netfilter: Fix nf_conntrack_lock() Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
  [PATCH -v3 4/8] locking, arch: Update spin_unlock_wait() Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
    Re: [PATCH -v3 4/8] locking, arch: Update spin_unlock_wait() Will Deacon <will.deacon@arm.com> - 2016-06-01 13:30 +0200
      Re: [PATCH -v3 4/8] locking, arch: Update spin_unlock_wait() Peter Zijlstra <peterz@infradead.org> - 2016-06-01 13:40 +0200
  [PATCH -v3 5/8] locking: Update spin_unlock_wait users Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
  [PATCH -v3 8/8] locking, tile: Provide TILE specific smp_acquire__after_ctrl_dep Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
  [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and friends into asm-generic/barrier.h Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
    Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and friends  into asm-generic/barrier.h Waiman Long <waiman.long@hpe.com> - 2016-05-31 22:10 +0200
      Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and  friends into asm-generic/barrier.h Peter Zijlstra <peterz@infradead.org> - 2016-06-01 11:40 +0200
        Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and  friends into asm-generic/barrier.h Peter Zijlstra <peterz@infradead.org> - 2016-06-01 14:10 +0200
          Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and  friends into asm-generic/barrier.h Will Deacon <will.deacon@arm.com> - 2016-06-01 14:20 +0200
            Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and  friends into asm-generic/barrier.h Peter Zijlstra <peterz@infradead.org> - 2016-06-01 14:50 +0200
              Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and  friends into asm-generic/barrier.h Will Deacon <will.deacon@arm.com> - 2016-06-01 16:10 +0200
                Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and  friends into asm-generic/barrier.h Peter Zijlstra <peterz@infradead.org> - 2016-06-01 19:20 +0200
        Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and  friends into asm-generic/barrier.h Will Deacon <will.deacon@arm.com> - 2016-06-01 14:10 +0200
        Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and friends  into asm-generic/barrier.h Waiman Long <waiman.long@hpe.com> - 2016-06-01 19:00 +0200
  [PATCH -v3 3/8] locking: Introduce smp_acquire__after_ctrl_dep Peter Zijlstra <peterz@infradead.org> - 2016-05-31 12:00 +0200
    Re: [PATCH -v3 3/8] locking: Introduce smp_acquire__after_ctrl_dep Boqun Feng <boqun.feng@gmail.com> - 2016-06-01 15:50 +0200
      Re: [PATCH -v3 3/8] locking: Introduce smp_acquire__after_ctrl_dep Peter Zijlstra <peterz@infradead.org> - 2016-06-01 18:30 +0200
        Re: [PATCH -v3 3/8] locking: Introduce smp_acquire__after_ctrl_dep Boqun Feng <boqun.feng@gmail.com> - 2016-06-02 01:20 +0200

csiph-web