From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbbINMGb (ORCPT ); Mon, 14 Sep 2015 08:06:31 -0400 Received: from casper.infradead.org ([85.118.1.10]:36287 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbbINMGa (ORCPT ); Mon, 14 Sep 2015 08:06:30 -0400 Date: Mon, 14 Sep 2015 14:06:19 +0200 From: Peter Zijlstra To: Davidlohr Bueso Cc: Waiman Long , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Scott J Norton , Douglas Hatch Subject: Re: [PATCH v6 1/6] locking/qspinlock: relaxes cmpxchg & xchg ops in native code Message-ID: <20150914120619.GQ18489@twins.programming.kicks-ass.net> References: <1441996658-62854-1-git-send-email-Waiman.Long@hpe.com> <1441996658-62854-2-git-send-email-Waiman.Long@hpe.com> <20150911222744.GC19736@linux-q0g1.site> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150911222744.GC19736@linux-q0g1.site> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 11, 2015 at 03:27:44PM -0700, Davidlohr Bueso wrote: > On Fri, 11 Sep 2015, Waiman Long wrote: > > >@@ -46,7 +46,7 @@ static inline bool virt_queued_spin_lock(struct qspinlock *lock) > > if (!static_cpu_has(X86_FEATURE_HYPERVISOR)) > > return false; > > > >- while (atomic_cmpxchg(&lock->val, 0, _Q_LOCKED_VAL) != 0) > >+ while (atomic_cmpxchg_acquire(&lock->val, 0, _Q_LOCKED_VAL) != 0) > > cpu_relax(); > > This code has changed with Peter's recent ccas fix. And the whole virt_queued_spin_lock() > thing will now be under pv configs. So this doesn't apply to native code anymore, so it > looks like it should be dropped altogether. Yeah, it also doesn't make sense, this ix x86 arch code, x86 cannot do cmpxchg_acquire. Then again, I suppose we could argue its of documentation value..