Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3236403rwb; Fri, 20 Jan 2023 13:10:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXvWRwKS/KpS/dcNp0BTVyXjp9542BMWOsC1cuXQuMEE92XoEQDTnSwX+qvgGWRfBLsSx+aM X-Received: by 2002:a05:6a21:3a46:b0:b0:2b4f:a9d9 with SMTP id zu6-20020a056a213a4600b000b02b4fa9d9mr17855885pzb.5.1674249013837; Fri, 20 Jan 2023 13:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674249013; cv=none; d=google.com; s=arc-20160816; b=GNSyYtKFAs3hk1DXEZyE09B3Kt19a3L23WfKrQLpNnoN/LR/KMzn7BbuKQYzkPkW3S 2AsaYJ1lfVPu9SMYknzGb/nJuh9QwJCevVltgCckQI/hSDxJTi5JxbZ3mN95+rqTe9Yr hNTuhcDhGPe6kMe57D4vlo64Z3zhOpQgOy23DQ1WDEhqgqL3bgYByVgEbFnrStA6El7P qdpXx3mrA9HI/ipMfu3LLN7FHGx1MVtfFHG23rWl3G7VzRmuhKQ7FskeaNeQosLa22Zv l8EIvzbhuvN8stXab3Jlt22UsNa2e84B3xSIJdZmOvUhMUx/yJjldXctG9IuGaOc2h70 rYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=+pSM7DGAsJV52H3rm1wCW8/H4fg6jYK1ewskj9kf1pg=; b=nxZv5i3vijxmQpC1cU5SwH6x7SpN1/qCaiT19hIpth194UK/qj1Mtw+fUSvdXhvC8I gUCC413FtR7v5Etu7E9kGbZFJ6YmpFbRQ9yDKCLpgvegv1vzxSmdG5UNGz9ya+iokX1k anYzKW1FE/K8B4z+rjqfgBAM2B9A3e1Duc4UIF4ir5rI+diW0VH67adl1McS1jMyZVr6 932ieX9el25uEO5e1plzonRkJcZ9wY8tqoVlerzracrzdVfEhA5712wtw6FPVVZ1Pqu7 Zx9Ct2DzgOYWa+EMFWGhoUkrXe8sp2gw0Ct5LtHjBiJoiTol7sMRetbafaumrNwebkP/ uvfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a639244000000b004770fe95989si43394581pgn.496.2023.01.20.13.10.07; Fri, 20 Jan 2023 13:10:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbjATUg1 (ORCPT + 50 others); Fri, 20 Jan 2023 15:36:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjATUg0 (ORCPT ); Fri, 20 Jan 2023 15:36:26 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id DC600891F7 for ; Fri, 20 Jan 2023 12:36:24 -0800 (PST) Received: (qmail 47262 invoked by uid 1000); 20 Jan 2023 15:36:24 -0500 Date: Fri, 20 Jan 2023 15:36:24 -0500 From: Alan Stern To: "Paul E. McKenney" Cc: Andrea Parri , Jonas Oberhauser , Peter Zijlstra , 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: <20230118035041.GQ2948950@paulmck-ThinkPad-P17-Gen-1> <20230118200601.GH2948950@paulmck-ThinkPad-P17-Gen-1> <20230119000214.GM2948950@paulmck-ThinkPad-P17-Gen-1> <20230120175804.GN2948950@paulmck-ThinkPad-P17-Gen-1> <20230120192032.GR2948950@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230120192032.GR2948950@paulmck-ThinkPad-P17-Gen-1> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 20, 2023 at 11:20:32AM -0800, Paul E. McKenney wrote: > On Fri, Jan 20, 2023 at 01:37:51PM -0500, Alan Stern wrote: > > srcu_read_unlock() does not need a full smp_mb(). > > That is quite possible, and that is what we are looking into. And testing > thus far agrees with you. But the grace-period ordering constraints > are quite severe, so this requires careful checking and severe testing. If you're interested, I can provide a simple argument to show that the Fundamental Law of RCU would continue to hold with only a release fence. There is an added requirement: merely that synchronize_srcu() must have an smp_mb() somewhere after its final read of the unlock counters -- which your version of the algorithm already has. Alan