Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp676412rdf; Tue, 21 Nov 2023 13:14:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgJFWojymEakoUPWYiIBlGpZDGTnsOjLr9Ci4detgDzBpeKEetvbpmO2w9job3oot6M+Gk X-Received: by 2002:a05:6a21:1a8:b0:187:4118:140 with SMTP id le40-20020a056a2101a800b0018741180140mr5650229pzb.24.1700601265397; Tue, 21 Nov 2023 13:14:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700601265; cv=none; d=google.com; s=arc-20160816; b=FxZf7O+A9jMUaWVKKmjwE/b++2hmqFKo0U36jbaLsS3hsUh+ZItRdRm+/l4IIXZoqZ taOtIY15Jkcia7md5lhU0W2MCm6nOLGOmTNtDrcPPEWRwnf0i31W4Bc7+MJxeZeLixTP CgsbJZIR8USwlFyOUvHJPT8ANbELCghNEH+EOmexUF7sAgOAnLFvdhv+UawnajOtL9km dZU9cgKcGtRBtlPVKIYnYP3lWuqsWVpeXFCUtkbw92E0bBb67cUeh7W1K9BPygDnMY03 0tIOI+Kndx5Kz09qK2AYLHrZwch32YoFiikjW2xqrFA4uo9845FWfLqEg8QRZzc9XTId l5jg== 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=Q4JRCQ9R64ROwYY8GJNu3zu8b2Dw3HE3i6xtzL+fo1g=; fh=7Fipe+2JB5VEmsq9/f9Qh5RDgPQOSLLwLTM1Cm1TVFU=; b=ssFOndqtq2vcfzolLnjxjVifNU4KFi+TBYvCnVHBpz1L1NpVcKgc0vUqnTDvtW8ZXg xMvcOOC7G98atw8AE5YMSgs9jcRa/MXmAmHs5rW0naa9Rt/RfMKnlWhvuVcghzCOW0Og GHZHVNANsXMGGoMAi7xo4dSeaOg1DZz5QDNdW20lNEruS4Jci/qEESFZRU4V3Z8yP/02 9HY5JqLVrODmxUI9NRylrzcLEf6r3CZ/jjO43sg3zblAkvqL8QnXDGaARJ0bQVXOwluw i9vPv3ELS1QjgF4Jl/GOOLIMy2LxwW428YgSFqb918OtH6+C2PwG3OAk1lH1G1xYVDnJ NnwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AMZkwADe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b19-20020a63d313000000b005c1cc9caf0asi11666725pgg.899.2023.11.21.13.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 13:14:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AMZkwADe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 16ED581067A5; Tue, 21 Nov 2023 13:14:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjKUVOV (ORCPT + 99 others); Tue, 21 Nov 2023 16:14:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjKUVOU (ORCPT ); Tue, 21 Nov 2023 16:14:20 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65A8C19E for ; Tue, 21 Nov 2023 13:14:17 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB56CC433C8; Tue, 21 Nov 2023 21:14:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700601257; bh=PEMlU7zldHLo1aKXjpxLqC8BQBT/nGnYIxViFracvZk=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=AMZkwADevVl74bFK0AXYkZpOmb+sxMA3c8gT7X7KerDoGNGc44afw8t+CFxXeQiO7 gUSj2x7+vgo5TX/VBK+hCprsYHY9O0E68Y1q1OJtO1nluP8SSNfD7KtfbHIDvA57DE 6mIj2E4hxGRnaY/zNzxnB/aioQ5oUCBUbw++bex55m2OriLsNcAGGy6d+uRDefvYRf IhPxTtS8OMPy5Sahjxc0W5w107NtwsIO77CCbAc4Ie2ysuijRiscRM5kuKEW5EWuw0 NSocnZq6aUKBoMcXt+uOg5p6IGSoT0cJydPOczCuSZXH/TcpXkkie8pvULGUIvuslR vzuVJg9iRET6g== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 8212DCE078E; Tue, 21 Nov 2023 13:14:16 -0800 (PST) Date: Tue, 21 Nov 2023 13:14:16 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Ankur Arora , linux-kernel@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@aculab.com, richard@nod.at, mjguzik@gmail.com Subject: Re: [RFC PATCH 48/86] rcu: handle quiescent states for PREEMPT_RCU=n Message-ID: <1cdbb0f6-9078-4023-bf37-8d826ca0c711@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107215742.363031-49-ankur.a.arora@oracle.com> <2027da00-273d-41cf-b9e7-460776181083@paulmck-laptop> <87lear4wj6.fsf@oracle.com> <46a4c47a-ba1c-4776-a6f8-6c2146cbdd0d@paulmck-laptop> <31d50051-e42c-4ef2-a1ac-e45370c3752e@paulmck-laptop> <20231121203049.GN8262@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121203049.GN8262@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 13:14:24 -0800 (PST) On Tue, Nov 21, 2023 at 09:30:49PM +0100, Peter Zijlstra wrote: > On Tue, Nov 21, 2023 at 11:25:18AM -0800, Paul E. McKenney wrote: > > #define preempt_enable() \ > > do { \ > > barrier(); \ > > if (!IS_ENABLED(CONFIG_PREEMPT_RCU) && raw_cpu_read(rcu_data.rcu_urgent_qs) && \ > > (preempt_count() & (PREEMPT_MASK | SOFTIRQ_MASK | HARDIRQ_MASK | NMI_MASK) == PREEMPT_OFFSET) && > > !irqs_disabled()) \ > > rcu_all_qs(); \ > > if (unlikely(preempt_count_dec_and_test())) { \ > > __preempt_schedule(); \ > > } \ > > } while (0) > > Aaaaahhh, please no. We spend so much time reducing preempt_enable() to > the minimal thing it is today, this will make it blow up into something > giant again. IPIs, then. Or retaining some cond_resched() calls, as needed. Or is there another way? Thanx, Paul