From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbbGMOYX (ORCPT ); Mon, 13 Jul 2015 10:24:23 -0400 Received: from foss.arm.com ([217.140.101.70]:58074 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbbGMOYW (ORCPT ); Mon, 13 Jul 2015 10:24:22 -0400 Date: Mon, 13 Jul 2015 15:24:18 +0100 From: Will Deacon To: Peter Hurley Cc: "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Benjamin Herrenschmidt , Paul McKenney , Peter Zijlstra Subject: Re: [RFC PATCH v2] memory-barriers: remove smp_mb__after_unlock_lock() Message-ID: <20150713142418.GF2632@arm.com> References: <1436789704-10086-1-git-send-email-will.deacon@arm.com> <55A3B89E.7060708@hurleysoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55A3B89E.7060708@hurleysoftware.com> 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 On Mon, Jul 13, 2015 at 02:09:50PM +0100, Peter Hurley wrote: > On 07/13/2015 08:15 AM, Will Deacon wrote: > > smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence > > into a full memory barrier. > > > > However: > > > > - This ordering guarantee is already provided without the barrier on > > all architectures apart from PowerPC > > > > - The barrier only applies to UNLOCK + LOCK, not general > > RELEASE + ACQUIRE operations > > I'm unclear what you mean here: do you mean > A) a memory barrier is not required between RELEASE M + ACQUIRE N when you > want to maintain distinct order between those operations on all arches > (with the possible exception of PowerPC), or, > B) no one is using smp_mb__after_unlock_lock() in that way right now. My understanding is (B), but Peter and I don't seem to agree yet! I'll tighten up the text once we reach a conclusion. Will