Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9736878rwl; Wed, 11 Jan 2023 09:17:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXtW64+hqxh5PCJBggYkN4Nufk37zPYq0jm5Boi1S0nY0FIAlXfxxvSpAwfB1anyD7He65f6 X-Received: by 2002:a05:6a20:4d84:b0:b5:e7b8:3f6e with SMTP id gj4-20020a056a204d8400b000b5e7b83f6emr9399853pzb.15.1673457436221; Wed, 11 Jan 2023 09:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673457436; cv=none; d=google.com; s=arc-20160816; b=LasgEIxhCpwiAoXtDq6+GTNrxNGqrs6hq9Ow5x8t6jyLR6zRQiAcWvkhOQgxzwcVH4 JT27F2j6gvP3Dsb4EUXZkHm4jjc/pIuOtjS57Bby6hKHk6q+ncX6FX16FB7LWMepPRzy 2iUQFFzrVMBrwTKxk6cndJObzrC6QHM0AHE1vk7+Raf5ls9U2oDa75xcCm9XFXBLQyhn /0fqdrXSjTrj9A2742hPTpkFjLnkvrLWv7yC9nGR80Ys0IIuzodbdjdyV2kvFhuIa+Gs r/21Wt59K9zm+ruLQ4szh3Otl/CN/CZibrAjBDBwlSWbzeo3QdR9pheXFy0IexDRvFUG /zBw== 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=A7AZNrLuEfY/WKnR0qwhUFEfUMBMWtd2zYgjBWEMk1g=; b=DV5dEKARwseZ8UdF0YGQvjQ2eSPQsCP2L3GzjwLzIbm9z4Hf6P9At1uzpmZMiye12U OaiB0GQwuZZTH4Wh7ayQ4K4wLKUUwQAfR+fFPLmw+B4w9/ufcwtguB1O9wzflM8lsEFt jfgDvAkgJdHonKqUkWKMEXIWrRx1Y0HTCsdU5e4v6vWx2etfnrLPy/aWMD8Ck9zfPRmV d9eFzpMJNSv2NCIObIQVTXcUl+dOqhqH1yTN83Nk7TEpRER1cyh2tARB0P/WEpBqoOnL 3ltrhjF5P7AmtS2+sSxFKsWfjFS7HnL2sW4accxvP73Pbx8hxr029xLIXTBDykTxP+cs ivWA== 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 bm18-20020a656e92000000b00476e98ca7d5si14228526pgb.785.2023.01.11.09.17.09; Wed, 11 Jan 2023 09:17:16 -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 S235735AbjAKRFJ (ORCPT + 53 others); Wed, 11 Jan 2023 12:05:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235681AbjAKREt (ORCPT ); Wed, 11 Jan 2023 12:04:49 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id E54D73F126 for ; Wed, 11 Jan 2023 09:02:01 -0800 (PST) Received: (qmail 717901 invoked by uid 1000); 11 Jan 2023 12:01:53 -0500 Date: Wed, 11 Jan 2023 12:01:53 -0500 From: Alan Stern To: Jonas Oberhauser Cc: "paulmck@kernel.org" , 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: References: <20220921173109.GA1214281@paulmck-ThinkPad-P17-Gen-1> <114ECED5-FED1-4361-94F7-8D9BC02449B7> <768ffe7edc7f4ddfacd5b0a8e844ed84@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <768ffe7edc7f4ddfacd5b0a8e844ed84@huawei.com> 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 Wed, Jan 11, 2023 at 04:45:46PM +0000, Jonas Oberhauser wrote: > > > -----Original Message----- > From: Alan Stern [mailto:stern@rowland.harvard.edu] > > On Wed, Jan 11, 2023 at 11:33:33AM +0000, Jonas Oberhauser wrote: > > > Considering how much effort it is to keep the documentation up-to-date > > > even for small changes, I'm extremely oscillation-averse. > > > Interestingly as I go through the documentation while preparing each > > > patch I often find some remarks hinting at the content of the patch, > > > e.g. "fences don't link events on different CPUs" and "rcu-fence is > > > able to link events on different CPUs. (Perhaps this fact should lead > > > us to say that rcu-fence isn't really a fence at all!)" in the current > > > explanation.txt. > > > > > [...] that I'll use strong-order right away, and then rename the handful of > > > other fences-but-not-really-at-all to '-order' as well. > > > > Minor snag: There already is an rcu-order relation in the memory model. > > Maybe we need a different word from "order". Or maybe rcu-order should be renamed. > > Yeah, I noticed (it's in the same section I'm quoting from above). There are > some other minor things that might need editing in that section, e.g., > "Written symbolically, X ->rcu-fence Y means > there are fence events E and F such that: > > X ->po E ->rcu-order F ->po Y." > But in fact the definition is > let rcu-fence = po ; rcu-order ; po? > which allows for F = Y and not F ->po Y. Yeah, that should be fixed. > I'll need to get a better understanding of rcu-order before I can form an > opinion of how things could be organized. The only thing I'm certain of is that > strong-order and rcu-fence should end up with the same suffix :D > > Just looking at it from afar, it almost looks like there's a simpler, > non-recursive definition of rcu-order trying to come out. I assume you've tried > various things and they don't work xP ? What is there to try? As far as I know, the only construct in the cat language that can be used to get the effect of counting is a recursive definition. > Is it because you use the recursion to "count" the grace periods and read-side > critical sections, in the sense of maintaining the inequality invariant between > them? I wonder if there's a "pumping lemma" that can show this can't be done > with a non-recursive definition. Such a lemma would have to be based on the other constructs available in the language. The only things I can think of which even come close are the * and + operators, and they are insufficient (because they are no stronger than regular expressions, which are well known to be too weak -- there isn't even a regular expression for strings in which the parentheses are balanced). Alan