Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp895284rwb; Sat, 14 Jan 2023 10:11:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXtYUyeRVWJ4r2n46ry4EXooLZn8MjqgKm7z/+1scqlJ/FnGFtXegYxqS2PjKycHhq8+zVUI X-Received: by 2002:a17:906:5283:b0:84d:4be4:aa2b with SMTP id c3-20020a170906528300b0084d4be4aa2bmr6632804ejm.68.1673719908790; Sat, 14 Jan 2023 10:11:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673719908; cv=none; d=google.com; s=arc-20160816; b=UTuH8D8IdnOsrtQtsGQ09PES9zE9rEEXiw2blllpfOo/yxpXlgVBJZcW6jzrVewYlu 0V2YEAIcAtk9zVpcvajEhgeaYi4grAge86Ta0DmMAaarbllctyT/x7GrdRGE+PYj+6pb q4jdbqkxNeh9XdzkyMKEKD4AcSj5ShSWhZbthpi8krWNO+PvqHKsEq14G2xS87Z5RVXr GHlMxRb0ce5aXvvY+1LK5kP/EALz80hT/PX8HQoAwCMrZRHohrQnmTbSnHA9lsMlh7i/ Puns0Qo1OuPl+QSB1t0LTTZLNUimwdIyuWvvdEDzgv5sH6yYp0PUCpaH2ko2loEDNvRN dDnw== 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=1Ftm7k56xV9ePjCckVa1P5YwXp5XW6nSDNJOPY1rc3g=; b=PgRUEhFCDP+jK7I1+Fx9NP1t5/7RUO9+8TJVcqDwGdEQrNRLNCZzBDQIANQGcSW9qE EQVrC5Y5l48s87cTodDCfdzdI4dXJpF4lyrl4mwurD5SnyVLy1wRSL0nFMGy8wEDBKUw mo/cKnVjELTpwn9PDDj1oddrQOvlXe2PaLWKfDn8uHWg/kGUX+F6q/cSPMtCyZ1hkzTa rdvZ14phV7gkXJzyGudgesIQ18B1ZJmsdFn7G3PSCVaWf6uF2caEUiIjcwwSwskYKudp b+IGtnPTSAlcJT0eskZX7OAThScXRj066MNSC1moTV0ggL1UcyIu60vB03ARMYpVco5/ djpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uFd1PMWz; 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 bb2-20020a1709070a0200b008626e197ac3si10631736ejc.692.2023.01.14.10.11.35; Sat, 14 Jan 2023 10:11:48 -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=uFd1PMWz; 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 S229758AbjANRfq (ORCPT + 52 others); Sat, 14 Jan 2023 12:35:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbjANRfo (ORCPT ); Sat, 14 Jan 2023 12:35:44 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73B68A5FC for ; Sat, 14 Jan 2023 09:35:43 -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 1E292B80A26 for ; Sat, 14 Jan 2023 17:35:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78601C433D2; Sat, 14 Jan 2023 17:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673717740; bh=fBs/5/NDVcFubeobMWDUeAUal8/5m4Zof7EY5X0kI98=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=uFd1PMWzYbo1ePnDKwwVX2b8vi70IHmQsYAPQAXcAi2g1Yb9mqRS7WIEAsvzjcWa8 aKyNoP9O6NL/KNCBGxE0zUu3gqz6PBII1RVv25Mey8bFZqdZywaZhgdvu//2dEygKC A2IHrltKzClDZsnUdSAuZCAqa7LVjLLOg7FKsmh4NMedeah15sCtrdfv0WG/c1vptn L6BnkmhOLPLF0Hxsu0VjF1e/YcbxSeTdGTJV/8T1qogX7ZtUjx63o54MrE3MEfFQDR r1NCopn7zzn633sLgGDHjoTmPeovjKkre3Ij3v1EFE8JUb7Ad9dp1lWlPMYpqVfs/y RcZEJNa/CPTBA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 16D2E5C0AF8; Sat, 14 Jan 2023 09:35:40 -0800 (PST) Date: Sat, 14 Jan 2023 09:35:40 -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: <20230114173540.GC2948950@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220921173109.GA1214281@paulmck-ThinkPad-P17-Gen-1> <114ECED5-FED1-4361-94F7-8D9BC02449B7> <4c1abc7733794519ad7c5153ae8b58f9@huawei.com> <20230113200706.GI4028633@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 Sat, Jan 14, 2023 at 11:55:17AM -0500, Alan Stern wrote: > On Fri, Jan 13, 2023 at 12:07:06PM -0800, Paul E. McKenney wrote: > > What Alan said! You could even have distinct partially overlapping > > grace periods, as the Linux kernel actually does have courtesy of normal > > grace periods via synchronize_rcu() and expedited grace periods via > > synchronize_rcu_expedited(). > > Or just two different CPUs making overlapping calls to > synchronize_rcu(). True, there could be two overlapping grace periods in that case. If nothing else, one of those synchronize_rcu() calls could be preempted for 500 milliseconds upon entry, thus overlapping many grace periods from the viewpoint of the user. Which is the viewpoint that LKMM should of course take. But because I had just been digging in the internals, I was taking an implemntation-centric viewpoint. From that viewpoint, there is at most one normal grace period in flight at a time. But even from that viewpoint, there can also be a single independent expedited grace period in flight at any given point in time, so partial overlap can happen even from an implementation-centric viewpoint. Which in no way negates or weakens your point, just letting you guys know where I was coming from. Because if things go as they normally do, there will be a future discussion where my head will once again be deep into the implementation. ;-) Thanx, Paul