Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755389AbbFLNQe (ORCPT ); Fri, 12 Jun 2015 09:16:34 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:39225 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755218AbbFLNQb convert rfc822-to-8bit (ORCPT ); Fri, 12 Jun 2015 09:16:31 -0400 From: Vineet Gupta To: Peter Zijlstra CC: "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "arc-linux-dev@synopsys.com" , "Paul E. McKenney" , "stable@vger.kernel.org" Subject: Re: [PATCH v2] ARC: add smp barriers around atomics per Documentation/atomic_ops.txt Thread-Topic: [PATCH v2] ARC: add smp barriers around atomics per Documentation/atomic_ops.txt Thread-Index: AQHQpQmWDD+gAhv2aEm6QQjMjMTvGw== Date: Fri, 12 Jun 2015 13:16:27 +0000 Message-ID: References: <1433850508-26317-19-git-send-email-vgupta@synopsys.com> <1434111359-6925-1-git-send-email-vgupta@synopsys.com> <20150612130450.GY19282@twins.programming.kicks-ass.net> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.197.3] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1534 Lines: 43 On Friday 12 June 2015 06:35 PM, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 05:45:59PM +0530, Vineet Gupta wrote: > - arch_spin_lock/unlock were lacking the ACQUIRE/RELEASE barriers > Since ARCv2 only provides load/load, store/store and all/all, we need > the full barrier > > - LLOCK/SCOND based atomics, bitops, cmpxchg, which return modified > values were lacking the explicit smp barriers. > > - Non LLOCK/SCOND varaints don't need the explicit barriers since that > is implicity provided by the spin locks used to implement the > critical section (the spin lock barriers in turn are also fixed in > this commit as explained above And iirc you're relying on asm-generic/barrier.h to issue smp_mb__{before,after}_atomic() as smp_mb(), right? Yep ! Acked-by: Peter Zijlstra (Intel) Thx ! Although I'd love to know why you need those extra barriers in your spinlocks... I'll keep you posted as I'd like to get rid of them too. But there's bunch of stuff going on ATM so can't really jump into investigating that. Will need some wrestling with perf... which makes me think that I'd posted a bunch of perf patches for ARC/ARCv2 as well - can u please take alook at them sometime soon ! Thx, -Vineet -- 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/