From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 687B9C61D85 for ; Tue, 21 Nov 2023 15:01:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2F6F6B043A; Tue, 21 Nov 2023 10:01:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CDFB36B0464; Tue, 21 Nov 2023 10:01:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BCFDA6B0466; Tue, 21 Nov 2023 10:01:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id AD1D36B043A for ; Tue, 21 Nov 2023 10:01:08 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 4B9E4A08D8 for ; Tue, 21 Nov 2023 15:01:08 +0000 (UTC) X-FDA: 81482274216.13.3FA75DD Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf10.hostedemail.com (Postfix) with ESMTP id 0B21AC0008 for ; Tue, 21 Nov 2023 15:00:51 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf10.hostedemail.com: domain of "SRS0=YbhT=HC=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=YbhT=HC=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700578852; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1uyvDpx3IkhlHdEAsluFU0VAFwWabTlbKSjnGvNPRKE=; b=TlVPxubyIHMGwqizhZb6FN7r5iT1NSf1dPvDdF4hy6hTT6xyyNWOFTISnVDx3DimVuc7Po i+rgppR86BQ0OQQNQgM9238I/gu0VKhErcXW7lIomXiZ9AvQNyX3iMlTqJLdPuHoNjus5e C5EfjmNrd+1YGrAJ46ZQfP7WwOCUbfw= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf10.hostedemail.com: domain of "SRS0=YbhT=HC=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=YbhT=HC=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700578852; a=rsa-sha256; cv=none; b=xHbggfICTCRHP/J/BV0OaKT/dxBnfErn9tTXAB6IU0O7k9vdGTYW/TbqsOQxMXbRuGYFjH h0GhH9UwhCL2BvOWzW6u5eDLad6bYSy5PGjEWVzFdhTOWF3/jpyZ7QoCC9cYhVJvhqIf1s lW2Oj/qqesVmvllmARUzPq/KMYkWwXY= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 75002B81BE3; Tue, 21 Nov 2023 15:00:49 +0000 (UTC) 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-Rspamd-Queue-Id: 0B21AC0008 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 6auesupu5atceaciymr1rmexn765yska X-HE-Tag: 1700578851-174366 X-HE-Meta: U2FsdGVkX19bcTwOaQZJ5w+WCxTrlLgloEalBF4CkSm5Kru1fHZ8yIFy0X1ohiwXzLi8dhxugYBfnZd3om37DgByZ1tLutpMD/mexA5ZHTKZE41IrZyUtiMaCqFIvlTNkGT4c4PrHGk9b/OjHTNHPopoV+ZLYUXBv15sONA7nA9vTq2wpua+/CS754zD5H7rd7XFX8wfp/5/FsE0KXeKom93wk/QStCH+kthTJI+WHeJshLMAODF6hHzVyIk6mP7buw8WQ6N7LYTm2a3X1uvN9C3tjdVDQkg/QD6aUGm4+1aQPnboZsqQfXcVU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-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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