Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp444068rdf; Tue, 21 Nov 2023 07:01:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyr6Uqhawatrmg3o5+tWiVrlvbyyEUKJ3bm2QeWFAPpL/IR+T6ue3y8koOj2bBMZzytEHq X-Received: by 2002:a05:6808:d4f:b0:3ab:8431:8037 with SMTP id w15-20020a0568080d4f00b003ab84318037mr15078526oik.32.1700578903675; Tue, 21 Nov 2023 07:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700578903; cv=none; d=google.com; s=arc-20160816; b=l/oWjKcNZg+ewl+RVGI9O/1mjQ7v6M3l57/vymR5Y//0BgPlDDSezmT/beHTRFz9mp JpcVmByJJiyqfNArSdguje5ZOGhcyDNU1piF5+5E3Ovi5/zmaKIFbR7tqJe1fe2SC8l3 kZtkVzZncOpsge6IlUSqEIK0yh83EthV6IqFAYdQDkVzhYCoQ7s0DW1eH9apbQeBcI0c KMO74aHdVU964jyBwPq5wwsH/xg3i5GeGxl8p9WVj/CvEZUVo8YzJ2fLnP3TPwbLNp7/ IiSnnnupmO2GhH8hgSLo8CBRcyHGKDFNXXegvJpFfzeaotE8z9B3ME1WP833mZF73mTE ED6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=1uyvDpx3IkhlHdEAsluFU0VAFwWabTlbKSjnGvNPRKE=; fh=OF3Yax5l7q3s6wrhjKcZo0cMvaI1by6rShJLZ7A6ZiI=; b=GnJgdEPbUnPbD0Zj+0eYcra0oCGjA8KneBw+zJ9mM8UVSZRTL6pDSecWGgpdMxOMQg 3MwCtdw97rK9c0D871EJ6k36wN5pLerc4yNJc68p9pLrz2PGUBdnx/GBfl/i3wbjLGXy vL3b9d9KIqj3qwl61IMXSLrIYDfUqPIsu9rVnXQSG1+SZPQaDlXEsbQtHl7TorEe+O3E cADTxPMwa0KaxXUO/OQWeWzBEbjO7Y8Nu6cJcDowWX9AfuMtzz+cPFrgrcQKQEHpT3gC We9F6TV96AImzUc2ZUJS9R4HofOnQJ2qtLkQP0CPQl3GGZ8xyBLniHBrXISK/49G4XMW vTWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id f14-20020a05680814ce00b003ae3e1b5191si3831586oiw.20.2023.11.21.07.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 07:01:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 625F68076640; Tue, 21 Nov 2023 07:01:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234816AbjKUPAy (ORCPT + 99 others); Tue, 21 Nov 2023 10:00:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234811AbjKUPAw (ORCPT ); Tue, 21 Nov 2023 10:00:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34E399D for ; Tue, 21 Nov 2023 07:00:49 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78850C433C7; Tue, 21 Nov 2023 15:00:44 +0000 (UTC) Date: Tue, 21 Nov 2023 10:00:59 -0500 From: Steven Rostedt To: "Paul E. McKenney" Cc: Ankur Arora , linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, 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, David.Laight@aculab.com, richard@nod.at, mjguzik@gmail.com, Simon Horman , Julian Anastasov , Alexei Starovoitov , Daniel Borkmann Subject: Re: [RFC PATCH 47/86] rcu: select PREEMPT_RCU if PREEMPT Message-ID: <20231121100030.3546b702@gandalf.local.home> In-Reply-To: <29984609-14e1-4ce4-864b-87932ba3245a@paulmck-laptop> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107215742.363031-48-ankur.a.arora@oracle.com> <20231107192703.1c493431@gandalf.local.home> <20231120224356.7e9e5423@gandalf.local.home> <29984609-14e1-4ce4-864b-87932ba3245a@paulmck-laptop> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 07:01:08 -0800 (PST) On Mon, 20 Nov 2023 21:04:28 -0800 "Paul E. McKenney" wrote: > How about like this, where "Y" means allowed and "N" means not allowed: > > Non-Preemptible RCU Preemptible RCU > > NONE: Y Y > > VOLUNTARY: Y Y > > PREEMPT: N Y > > PREEMPT_RT: N Y > > > We need preemptible RCU for NONE and VOLUNTARY, as you say, > to allow CONFIG_PREEMPT_DYNAMIC to continue to work. (OK, OK, > CONFIG_PREEMPT_DYNAMIC is no longer, but appears to be unconditional.) > But again, I don't see why anyone would want (much less need) > non-preemptible RCU in the PREEMPT and PREEMPT_RT cases. And if it is > neither wanted nor needed, there is no point in enabling it, much less > testing it. > > Or am I missing a use case in there somewhere? As Ankur replied, this is just an RFC, not the main goal. I'm talking about the end product which will get rid of the PREEMPT_NONE, PREEMPT_VOLUNTARY and PREEMPT conifgs, and there will *only* be the PREEMPT_DYNAMIC and PREEMPT_RT. And yes, this is going to be a slow and long processes, to find and fix all regressions. I too am concerned about the latency that this may add. I'm thinking we could have NEED_RESCHED_LAZY preempt when there is no mutex or other semi critical section held (like migrate_disable()). Right now, the use of cond_resched() is basically a whack-a-mole game where we need to whack all the mole loops with the cond_resched() hammer. As Thomas said, this is backwards. It makes more sense to just not preempt in areas that can cause pain (like holding a mutex or in an RCU critical section), but still have the general kernel be fully preemptable. -- Steve