Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318AbbKLMf1 (ORCPT ); Thu, 12 Nov 2015 07:35:27 -0500 Received: from casper.infradead.org ([85.118.1.10]:40869 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbbKLMfY (ORCPT ); Thu, 12 Nov 2015 07:35:24 -0500 Date: Thu, 12 Nov 2015 13:35:21 +0100 From: Peter Zijlstra To: ralf@linux-mips.org, ddaney@caviumnetworks.com Cc: linux-kernel@vger.kernel.org, Paul McKenney , Will Deacon , torvalds@linux-foundation.org, boqun.feng@gmail.com Subject: Re: [RFC][PATCH] mips: Fix arch_spin_unlock() Message-ID: <20151112123521.GJ11639@twins.programming.kicks-ass.net> References: <20151112123123.GZ17308@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151112123123.GZ17308@twins.programming.kicks-ass.net> 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 Content-Length: 859 Lines: 23 On Thu, Nov 12, 2015 at 01:31:23PM +0100, Peter Zijlstra wrote: > +++ b/arch/mips/include/asm/spinlock.h > @@ -140,7 +140,7 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) > static inline void arch_spin_unlock(arch_spinlock_t *lock) > { > unsigned int serving_now = lock->h.serving_now + 1; > - wmb(); > + smp_mb(); > lock->h.serving_now = (u16)serving_now; Also, you might want to consider using WRITE_ONCE() for that store. > nudge_writes(); And that thing is creative, I've not seen any other arch issues barriers to speed up the store buffer flush. Does it really matter for MIPS? > } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/