From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E117FC53210 for ; Wed, 4 Jan 2023 20:59:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235397AbjADU67 (ORCPT ); Wed, 4 Jan 2023 15:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbjADU65 (ORCPT ); Wed, 4 Jan 2023 15:58:57 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id BC39015FCE for ; Wed, 4 Jan 2023 12:58:53 -0800 (PST) Received: (qmail 481624 invoked by uid 1000); 4 Jan 2023 15:58:52 -0500 Date: Wed, 4 Jan 2023 15:58:52 -0500 From: Alan Stern To: Andrea Parri Cc: Jonas Oberhauser , Peter Zijlstra , "Paul E. McKenney" , will , "boqun.feng" , npiggin , dhowells , "j.alglave" , "luc.maranget" , akiyks , dlustig , joel , urezki , quic_neeraju , frederic , Kernel development list Subject: Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus test) Message-ID: References: <20220921173109.GA1214281@paulmck-ThinkPad-P17-Gen-1> <114ECED5-FED1-4361-94F7-8D9BC02449B7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 04, 2023 at 04:37:14PM +0100, Andrea Parri wrote: > Sounds good to me too. I'm trying to remember why we went for the LKW > event to model smp_mb__after_unlock_lock() (as opposed to the LKR event, > as suggested above/in po-unlock-lock-po). I don't remember either, but with the LKR event it would be awkward to include the co part of (co | po) in the smp_mb__after_unlock_lock() definition. You'd have to write something like ((co? ; rf) | po). Aside from that, I don't think using LKR vs. LKW makes any difference. > Anyway, I currently see no > issue with the above (we know that LKW and LKR come paired), and I think > it's good to merge the two notions of "unlock-lock pair" if possible. Indeed. It also would eliminate questions about why po-unlock-lock-po doesn't include the co term. Alan