Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754337AbcDMRnJ (ORCPT ); Wed, 13 Apr 2016 13:43:09 -0400 Received: from foss.arm.com ([217.140.101.70]:36609 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbcDMRnH (ORCPT ); Wed, 13 Apr 2016 13:43:07 -0400 Date: Wed, 13 Apr 2016 18:43:04 +0100 From: Will Deacon To: Jason Low Cc: Peter Zijlstra , Linus Torvalds , linux-kernel@vger.kernel.org, mingo@redhat.com, paulmck@linux.vnet.ibm.com, terry.rudd@hpe.com, waiman.long@hpe.com, boqun.feng@gmail.com, dave@stgolabs.net, kbuild test robot , kbuild-all@01.org Subject: Re: [PATCH v2] MCS spinlock: Use smp_cond_load_acquire() Message-ID: <20160413174302.GC21722@arm.com> References: <1460516537.2709.7.camel@j-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460516537.2709.7.camel@j-VirtualBox> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 679 Lines: 18 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 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. Will