Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3314606rwb; Fri, 20 Jan 2023 14:22:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXteBE5Ml28lT9np7yondIwIKUX5K1Ri1Ivf468A1YKTpD+/48BhiixJ52tLKBf23mUiz/Fi X-Received: by 2002:a17:902:b697:b0:194:a26e:48ad with SMTP id c23-20020a170902b69700b00194a26e48admr16477080pls.0.1674253365197; Fri, 20 Jan 2023 14:22:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674253365; cv=none; d=google.com; s=arc-20160816; b=AyUoklHWFAEIkTvwOEq1ybI/XFs32nIgR6Nl/WIecNvcxoqWFtO11fy0/24fnuwrgs dqjlucj7ASLTT4wniEzp+nbji/eAnXmq0CObxCWTcbzb7daWeKJ9qcMuxXkDKT2+ryxg 9dkm5dAwUrG5SSGd0cfJrnfNeZJPvq7OY8BwyRPHRapCQKI8S6IkykzqqMsemE0d99tU LJ2F7arNZji37XpogYZxIjImd9A/1P37mmHiLm6a8XQNq6n/HCylUy/GMgRyzfYJTQxe VYAxpY2o2McO/Gi/NSJRRiA748K9isSK5VGDVWXLqetECGB8GgfZAskteViatz4yF4PF xy8w== 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-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=xDUEgGKPvm8/h4ywVyXTjziLEz+xJ20NTaYzERZ3Nlc=; b=ZzeUcyO2JoKOH1Zre0YKsQTdhfIn4DaW10f9pFXuBo2FjBWOcvxLCyqMgMiofVhF1R tDgKUWScJshSc0LwXRvC+sEFjOmBpWp7ZEb+fZdC5uSoMcWOteD983sUpSCX+bG76nY+ drQXJPRuflYhw5pWEOQ3CCnw+kbMtEh5J+o1Gb9v666anS8FCyvgle1udhLr067UU8O+ yMN8b2N5gUMu84erKeRWg/r/b0aAf4hmOiX8gEbSt7K0G16H5HM9LXWFiQMhELxuHCM4 8++549G31A8TXkPaptOdUX2QfRUu2D/r7OUBgcskXlf4Vqn3LwiV/D++N9wJwGwlu+ag WE1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p1Y6XrFG; 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 o19-20020a170902e01300b00194819b340dsi16272954plo.351.2023.01.20.14.22.39; Fri, 20 Jan 2023 14:22:45 -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=p1Y6XrFG; 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 S229661AbjATVk7 (ORCPT + 50 others); Fri, 20 Jan 2023 16:40:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjATVk5 (ORCPT ); Fri, 20 Jan 2023 16:40:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 247E64F344 for ; Fri, 20 Jan 2023 13:40:57 -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 dfw.source.kernel.org (Postfix) with ESMTPS id B6F8F62093 for ; Fri, 20 Jan 2023 21:40:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F466C433EF; Fri, 20 Jan 2023 21:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674250856; bh=t6cCzOyUtRE4Sv+OM5VqdeIXfQyGfsPKwTULAq1p5/g=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=p1Y6XrFGH3a99aaKrRy97Tji5dsHti1uTGRbs5aQBjMY2gAFRvDUvkbq1y6JQGkJ9 FLg8OnuHSjB2kUQQ7jJmQB9lxcJR1n5U5la8hxLQkRwVgFlCH1T1ZlfmInQafv/FFe mFPggckIt+hXrlmkKWy2pmklNkL/WMeo3TU9bkVezsrJ/WUyb28l0l2TKL8tJZbTb7 l2kIUME+P8YIIDpP0tON4F7lRHfTfcEzar9brNuJ+Ylz4RPIPPpg9TpWbbi7untD0o xAMyQKM7lbkQyL/8AcU9VXQ1OjZ7Vq0mCxJXuwqx9UiLvEO/zj6i32xp1+KC7/QRVM 7V50ABW+zZHow== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id A79C15C08A4; Fri, 20 Jan 2023 13:40:55 -0800 (PST) Date: Fri, 20 Jan 2023 13:40:55 -0800 From: "Paul E. McKenney" To: Jonas Oberhauser 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: <20230120214055.GY2948950@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <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> <20230120035521.GA319650@paulmck-ThinkPad-P17-Gen-1> <126e32b7-caa7-0a1e-4589-885aef7c5a39@huaweicloud.com> <20230120153242.GE2948950@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 20, 2023 at 09:56:36PM +0100, Jonas Oberhauser wrote: > > > On 1/20/2023 4:32 PM, Paul E. McKenney wrote: > > On Fri, Jan 20, 2023 at 01:51:01PM +0100, Jonas Oberhauser wrote: > > > I'm not going to get it right today, am I? > > Believe me, I know that feeling! Open-source development is therefore > > an extremely good character-building exercise. At least that is what > > I keep telling myself. ;-) > > "Calvin, go do something you hate! Being miserable builds character!" Heh! There is the school of thought that says that if children automatically did everything that they needed to do, they would not need parents. Now about adults doing what they need to do, myself included... ;-) > > > +let srcu-rscs = ([Srcu-lock] ; (data ; [~ Srcu-unlock] ; rfe) * ; data ; > > > [Srcu-unlock]) & loc > > > > > > I see now that I copied the format from your message but without realizing > > > the original had a `|` where I have a `;`. > > > I hope this version is finally right and perhaps more natural than the (data > > > | rf) version, considering rf can't actually appear in most places and this > > > more closely matches carry-dep;data. > > > But of course feel free to use > > > +let srcu-rscs = ([Srcu-lock] ; (data? | [~ Srcu-unlock] ; rf)+ ; > > > [Srcu-unlock]) & loc > > > instead if you prefer. > > > > The reason for favoring "rf" over "rfe" is the possibility of a litmus > > test where the process containing the srcu_down_read() sometimes but > > not always also has the matching srcu_up_read(). Perhaps a pair of "if" > > statements control which process does the matching srcu_up_read(). > > If you put the redefinition of data early enough to affect this definition, > the rfi option should be covered by the carry-dep in the redefinition of > data, so I left it out. For right now, I will favor obviousness over minimalism, but for the real patch, I will let Alan decide what makes the most sense. I am sure that you will not be shy about letting him know of your thoughts on the matter. ;-) Thanx, Paul > > And thank you!!! > > always ;-) > > jonas >