From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934591AbcIAQlk (ORCPT ); Thu, 1 Sep 2016 12:41:40 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:53478 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754045AbcIAQli (ORCPT ); Thu, 1 Sep 2016 12:41:38 -0400 Date: Thu, 1 Sep 2016 18:41:26 +0200 From: Peter Zijlstra To: Will Deacon Cc: Manfred Spraul , benh@kernel.crashing.org, paulmck@linux.vnet.ibm.com, Ingo Molnar , Boqun Feng , Andrew Morton , LKML , 1vier1@web.de, Davidlohr Bueso , Pablo Neira Ayuso , netfilter-devel@vger.kernel.org Subject: Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another memory barrier Message-ID: <20160901164126.GZ10153@twins.programming.kicks-ass.net> References: <1472743673-15585-1-git-send-email-manfred@colorfullife.com> <20160901153039.GN6721@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160901153039.GN6721@arm.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 01, 2016 at 04:30:39PM +0100, Will Deacon wrote: > On Thu, Sep 01, 2016 at 05:27:52PM +0200, Manfred Spraul wrote: > > Since spin_unlock_wait() is defined as equivalent to spin_lock(); > > spin_unlock(), the memory barrier before spin_unlock_wait() is > > also not required. Note that ACQUIRE+RELEASE isn't a barrier. Both are semi-permeable and things can cross in the middle, like: x = 1; LOCK UNLOCK r = y; can (validly) get re-ordered like: LOCK r = y; x = 1; UNLOCK So if you want things ordered, as I think you do, I think the smp_mb() is still needed. RELEASE + ACQUIRE otoh, that is a load-store barrier (but not transitive).