Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1477375rwb; Fri, 13 Jan 2023 12:54:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXttEbwCpk8ZW9qK4ChDGLF88JxpfYLsMKqKVslsn64fdr7xynYmgJbtszQq2KvbxyyO1DFm X-Received: by 2002:a05:6402:685:b0:46c:e558:ce60 with SMTP id f5-20020a056402068500b0046ce558ce60mr69335285edy.22.1673643269896; Fri, 13 Jan 2023 12:54:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673643269; cv=none; d=google.com; s=arc-20160816; b=icSzAcKrybBHjb/mkP4eJZmQ66xWa7n6LjdVNbniWmUsUGM7h3ziZ96bY6dnn0q4VP Le+G+GjbukK2IcTUQyoRBNNHOp4NaZL1IuSfRKFHyBcNuw2XgXNnKR97PW+1YHl3wo65 Co9HhOshxx1kVzueNOfqCHJAqB4wHO+DkguifbhJrbfuc0Z79G+TUkWNF79IbSFxUlix 44TGP+aKVmFINmpV28R8SX09yTJW/TjTRb9+U0HF2KdpRPJVoC1DAWn56CZIp82QNYKd 9Ufv+f+P0zQrYEndzUXn6GhFB4RRodZMf96oe1SlMyQnYfSXzvme9CP5EUs8/I1uNZM5 Oy2Q== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=T4dKGmlK+hrXT8DWVL/PkPsDm0bi97Va8Doi5IE7pEY=; b=MJXX0i4lsiJXCUCtEIktz3VG4tvWGMns5td4aeHlZD86skndwfksp2UYtV4YKPmoZy IwyKjVKEUVBXWZQ+kN5xDjaRoPrvnUCY0gu7SoS4L38ilTUiP3wzirjzfpeVlB+utFKg +5SJH2M5mkni/lIVP93gA1bBMVsXMDaWIu/qmkBt6ys/101EK70jGgt45APIr6Rs1dxe qv3HAO1bz7v1z/Li2MeKblLfeBmCXMO1g+qZE+Bm4gm8TM8f0k2QnFLh30NQmh1vxgLL bl45pOgEBbjRDY5tykgN2b4fn/VmudU5cIggyF6q0JJRGOFWwSiImaagHyK14teaxPt+ ucgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pJmT5Pvv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020aa7ccd3000000b0047039339346si21778557edt.550.2023.01.13.12.54.16; Fri, 13 Jan 2023 12:54:29 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pJmT5Pvv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbjAMTys (ORCPT + 52 others); Fri, 13 Jan 2023 14:54:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbjAMTyh (ORCPT ); Fri, 13 Jan 2023 14:54:37 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D86888DDC for ; Fri, 13 Jan 2023 11:54:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 154BCB821DF for ; Fri, 13 Jan 2023 19:54:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90CB0C433D2; Fri, 13 Jan 2023 19:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673639671; bh=Y/w6vJeJuHUinD9KGK3kerO1AhLkFCVJWK8dB6aZrEY=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=pJmT5Pvvo80X5igVBOPtwUrPD1cNfy7bqXsPVWT0YUga6gGRoD4sol1R1RUyhvN2l F2gT5vI0b67gg5fwwkTqjG0F7CDNUBxUDPMhCDUT0Ogz4pYjqq4Q5GnkK5SP/tC2lM qaN7zt7ErIco6vB3iZNrrJ3BbSZeQEgq8BkoGifp9NcNgHrwGvsrh5of9mJxFAQGvC a09Sp5e67SkHxpYs4QNUfEzBjV3gzAh6iLSA6j5K6JmD2MMhOEk793KzHLgxu2Mybq +KJzWkiFk4t+x4njhjW/Uc7IzJ/npy+2iKWSjfxcHB0PI7Dr/MWXslxtx8iS1uVtPx iLBaWHPjn4OPQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 2D53E5C06D0; Fri, 13 Jan 2023 11:54:31 -0800 (PST) Date: Fri, 13 Jan 2023 11:54:31 -0800 From: "Paul E. McKenney" To: Alan Stern Cc: Jonas Oberhauser , Peter Zijlstra , "parri.andrea" , 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: <20230113195431.GH4028633@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220921173109.GA1214281@paulmck-ThinkPad-P17-Gen-1> <114ECED5-FED1-4361-94F7-8D9BC02449B7> <07579baee4b84532a76ea8b0b33052bb@huawei.com> <20230112215716.GS4028633@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 13, 2023 at 11:38:17AM -0500, Alan Stern wrote: > On Thu, Jan 12, 2023 at 01:57:16PM -0800, Paul E. McKenney wrote: > > > I will risk sharing the intuition behind the rcu-order counting rule. > > > > In the code, an RCU read-side critical section begins with rcu_read_lock() > > and ends with the matching rcu_read_unlock(). RCU read-side critical > > section may be nested, in which case RCU cares only about the outermost > > of the nested set. > > > > An RCU grace period includes at least one moment in time during which > > each and every process/CPU/task/whatever is not within an RCU read-side > > critical section. > > Strictly speaking, this is not right. It should say: For each > process/CPU/task/whatever, an RCU grace period includes at least one > moment in time during which that process is not within an RCU read-side > critical section. There does not have to be any single moment during > which no processes are executing a critical section. > > For example, the following is acceptable: > > CPU 0: start of synchronize_rcu()......end > CPU 1: rcu_lock().....................rcu_unlock() > CPU 2: rcu_lock().......................rcu_unlock() You are quite right, thank you! Yes, the time outside of an RCU read-side critical section for a given process/CPU/task/whatever need not be simultaneous with any other process/CPU/task/whatever. Thanx, Paul