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


Groups > linux.kernel > #1378612

Re: [PATCH v2] MCS spinlock: Use smp_cond_load_acquire()

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] MCS spinlock: Use smp_cond_load_acquire()
Date 2016-04-14 11:00 +0200
Message-ID <rnLi2-7rI-3@gated-at.bofh.it> (permalink)
References <rnjlL-29L-3@gated-at.bofh.it> <rnx5n-4TK-11@gated-at.bofh.it> <rnA3g-7bV-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 13, 2016 at 01:49:04PM -0700, Jason Low wrote:
> On Wed, 2016-04-13 at 10:43 -0700, Will Deacon wrote:
> > On Tue, Apr 12, 2016 at 08:02:17PM -0700, Jason Low wrote:
> > > For qspinlocks on ARM64, we would like to use WFE instead
> > > of purely spinning. Qspinlocks internally have lock
> > > contenders spin on an MCS lock.
> > > 
> > > Update arch_mcs_spin_lock_contended() such that it uses
> > > the new smp_cond_load_acquire() so that ARM64 can also
> > > override this spin loop with its own implementation using WFE.
> > > 
> > > On x86, it can also cheaper to use this than spinning on
> > > smp_load_acquire().
> > > 
> > > Signed-off-by: Jason Low <jason.low2@hp.com>
> > 
> > FWIW, we just override arch_mcs_spin_lock_contended entirely for arch/arm/
> > and use wfe there so we could do the same for arm64 in mainline already.
> 
> Right, I was also thinking about that, although when we use
> smp_cond_load_acquire() in the generic implementation, would we just end
> up overriding it for the arch/arm64 version with the same thing?  :)

Sure, and we can convert to smp_cond_load_acquire then. I was just thinking
that you can avoid the immediate dependency on Peter's stuff, that's all.

Will

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


Thread

[PATCH v2] MCS spinlock: Use smp_cond_load_acquire() Jason Low <jason.low2@hp.com> - 2016-04-13 05:10 +0200
  Re: [PATCH v2] MCS spinlock: Use smp_cond_load_acquire() Will Deacon <will.deacon@arm.com> - 2016-04-13 19:50 +0200
    Re: [PATCH v2] MCS spinlock: Use smp_cond_load_acquire() Jason Low <jason.low2@hp.com> - 2016-04-13 23:00 +0200
      Re: [PATCH v2] MCS spinlock: Use smp_cond_load_acquire() Will Deacon <will.deacon@arm.com> - 2016-04-14 11:00 +0200

csiph-web