Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2885810rwb; Fri, 20 Jan 2023 08:30:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXv03qgsm2SYew92oq/3uqIu0liU+jPMr4sNSGY9zHnxTM3xWMb5AoM3UI/4lodzYYPe8xau X-Received: by 2002:a17:906:df49:b0:84d:34fa:f1a4 with SMTP id if9-20020a170906df4900b0084d34faf1a4mr13783605ejc.60.1674232213999; Fri, 20 Jan 2023 08:30:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674232213; cv=none; d=google.com; s=arc-20160816; b=JMQMYd72nV9+bytceGUPBD8WLtDoVUOuZDYRj3VVPGMJ1lK4H90GjUh6iSJjxqk659 5A/ez3JU5UbvsPJWA4dw2SVenEm7/CMJGqDIK7mXXFwkpK9dSYcgKfSVg9FTa1oncQdw G0JX3gGgaiKTni+gVMenJt8bemgQ5A/M0Mr42+o3SwWqdc2qPRvMeOokXdP4jdIzgwYu t+lv1AoZZJna8pbpsvo63XnEsT5EOVnFEHI/A45WwbWs6ZVAMQOXo1b+Vd3Slgxpqtky GaIG5pNn4VgtQPHICMmSXBYnFBoQf3/Nd8WlJi0Ix+dIpDFNm4XtbYzFQxceJVUpeF7S BrOg== 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=ldL+tLs+w4wkZue2JJKtzKskYPzNEyiTfsbVaCQJhRk=; b=TTDq3QpCIbCxh1CJtl9NgpliizaIq+m68VHrEH3s+V+oSDQvMoPnALXCb79QGPSuvO Gt21MMVJqau423sHii88V4XwwlWtzC6O1XSNtB7VVAQqToIaVZsxJxpxathtzll7JUH4 VKuEiY/XqFLvpkoK/f5TTh/VtZO6iH9zbfwMtd+WXmgAbfrVyiPaXNsftRyYG6gcZG6E ep7NBkW7b9rVLuwA2A/aEHnigHAg4kjl3trZFWqMr/8YxjfibgGi+tbmuxU3kaLnHJXE I+RhI5jRnK5Hy28l+w69Mknmcah1nhnnnI36UHxL8zET0LkBk03uGwVGQNFHDuaRIeKb 3Fvg== 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 q11-20020a056402032b00b0048d858ddabfsi41019233edw.414.2023.01.20.08.30.01; Fri, 20 Jan 2023 08:30: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 S229595AbjATQSa (ORCPT + 52 others); Fri, 20 Jan 2023 11:18:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjATQS3 (ORCPT ); Fri, 20 Jan 2023 11:18:29 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 2F1FE7CCF6 for ; Fri, 20 Jan 2023 08:18:06 -0800 (PST) Received: (qmail 38184 invoked by uid 1000); 20 Jan 2023 11:18:03 -0500 Date: Fri, 20 Jan 2023 11:18:03 -0500 From: Alan Stern To: Jonas Oberhauser Cc: paulmck@kernel.org, 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: <3dabbcfb-858c-6aa0-6824-05b8cc8e9cdb@gmail.com> <20230118201918.GI2948950@paulmck-ThinkPad-P17-Gen-1> <20230118211201.GL2948950@paulmck-ThinkPad-P17-Gen-1> <09f084d2-6128-7f83-b2a5-cbe236b1678d@huaweicloud.com> <20230119001147.GN2948950@paulmck-ThinkPad-P17-Gen-1> <0fae983b-2a7c-d44e-8881-53d5cc053f09@huaweicloud.com> <20230119184107.GT2948950@paulmck-ThinkPad-P17-Gen-1> <64b48a7b-624c-26bd-be9b-0522fc490b28@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64b48a7b-624c-26bd-be9b-0522fc490b28@huaweicloud.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 Fri, Jan 20, 2023 at 11:13:00AM +0100, Jonas Oberhauser wrote: > Perhaps we could say that reading an index without using it later is > forbidden? > > flag ~empty [Srcu-lock];data;rf;[~ domain(data;[Srcu-unlock])] as > thrown-srcu-cookie-on-floor We already flag locks that don't have a matching unlock. I don't see any point in worrying about whatever else happens to the index. > So if there is an srcu_down() that produces a cookie that is read by some > read R, and R doesn't then pass that value into an srcu_up(), the > srcu-warranty is voided. No, it isn't. As long as the value is passed to exactly one srcu_up_read(), it doesn't much matter what else you do with it. Alan