From patchwork Fri Feb 23 00:26:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 205154 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp302171dyb; Thu, 22 Feb 2024 16:28:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW5hfilZXMD/YvDMUGqWisgy3YjXts5zmbLZWa6emE7qJp+BwtKt10EoicqZwXYY83jjKG3PCAo1kwbV//EzF8KcY+UTA== X-Google-Smtp-Source: AGHT+IEqNYqomEI+YM6wIvL2u91NjE+pM2wLFwId0YhC7MjIwoVIpXB6pV8l+7jaCqFGulxfP3iU X-Received: by 2002:a05:6a00:2314:b0:6e4:c375:8bf0 with SMTP id h20-20020a056a00231400b006e4c3758bf0mr622836pfh.14.1708648088682; Thu, 22 Feb 2024 16:28:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708648088; cv=pass; d=google.com; s=arc-20160816; b=F8GDI9XF7YgkcEybJthpp/w2l1iFU8hTdv/gT+t7EAoQ+bek0q1q208ED7x5qknLlZ fw7xFAX/dNx4lBDoqCmhgKk/DAjWLZMwAv0zbxpe4kOVyOpu7O507CQZDV8V0pN1Qumu CIt8IJg5/R15vUh6ll+qnC02O6qTuzpswYWCYA4bEZF0F6phjd5R3W6LBNAuolk4j4PM ju0HDmxEDGaVY6JT2Yopxa2kI5LSc9aTGrJlEubAvpsDaOKwEkyqLFcsCgneKCn+LI6k kMF68hLHcCImTr008e75v1hwMApBac0B07S71nOVOVmvhqw18D6uqCYN3tkHG6qkxhmD 7nmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/WcyGHZedPCxbBSURe3/tR8GcxECX76dooKZB7wXmEY=; fh=CuxApCrUOTZt0wdMPXclSmvvEE749bqz5B9kASG95ZE=; b=vTxvT1yhH78yU+t9FEd8xdiu1WKh+CgvsvU8HRnm61FGSlMcKbY781tHYXSqgSA1EB ThTJfz/xeMCx/Dg6bhCpuHd+inh8USmVsBGjma7GRioYpL7+3MVEFGJ8labmtXOKZLEE 7SGLdLeA3n19tOOdZktoQPxSlCP51BYZzJsU/HSpKeKHi0TZJvwlJ/8dXsJiPHLh9tD8 TN4hlaUZRtlP3OgDNeqgllgzQmjNpnNCLnnorwxSHYoQifMVC4uxmgzY28YDsA57jbvy B4/B1Y5rylZ8zOUzY8f8JMuZVm1w88y7bI1Ag9M/Psz2a0Yry+gVQYS+i8/ZAbwN5hDg HsuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XgJLx+iR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77573-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77573-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id cn9-20020a056a00340900b006e4892148d1si4891969pfb.355.2024.02.22.16.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 16:28:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77573-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XgJLx+iR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77573-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77573-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BFA7AB23F1A for ; Fri, 23 Feb 2024 00:27:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C3AE947F; Fri, 23 Feb 2024 00:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XgJLx+iR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9408372; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; cv=none; b=tebU2agpIq/Nd1+sdMArIW+PI1M9yIDP+64nqTqD3E3OyveBxDCEIdKBAW8D+bhD7o3eQWyc1ydmqvrXqAElp63mLlDzOwQoHwXNTIzrB5zOUYfRDven1lw5aom57UC0erSnMp2XtGcif2nTsME49FHbs6eGANYeCbOS93vb8oM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; c=relaxed/simple; bh=dqGOB7Gat6TFDeBuXsH+ly4XsXWkpbCooGphVwFg0Ns=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YLzYKR6ecnEt7ZD4pLgPjQtEHNn/sSTtb3HPH3TbaeQWr0q/69PEEQzx0Bs8E2AmhrDPxeadW2S5TLBTl0fiV3PPotlmnvP6gObkGoG5j1cYBc16/B3GltgrAm+6u6nfARGpTQ1Aa2MqhQQsux7WoJfPsm4heCfBcjY46tGmqxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XgJLx+iR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4620FC433F1; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708647989; bh=dqGOB7Gat6TFDeBuXsH+ly4XsXWkpbCooGphVwFg0Ns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XgJLx+iRcLoLouPIp30wP5iCKqNhjVA9MDeOFPxr3EQT5X2Im5qs+CpPm6mvHxia/ fT92RWI2wOPAq5Dpp2WdvHz2/7pUxqCPxAYxqdQi67JldTnLeRwOLgEBKztXtAebao 8IfrFnm4WxPjajnoQw6D96NC8VPXsO86bnnIU1PbQ1s6NqxbWUuS75sLp8bctoYdaO ZTTyb79sfZLA/ziSTcCLe+KEFOiTNG0nKrPrze4qrgbbaOJvvFHM5ecfR1gWi6Aaow YVUrcaDYgZUWZWkWbb/C2RhzRVULh1od1pXBB0r9NiITewu8jHeW67ozXcIBcjbMwL p2Xbav3BHnKyg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id EC969CE0B71; Thu, 22 Feb 2024 16:26:28 -0800 (PST) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" , Ankur Arora , Thomas Gleixner , Mark Rutland Subject: [PATCH rcu 1/4] rcu: Create NEED_TASKS_RCU to factor out enablement logic Date: Thu, 22 Feb 2024 16:26:24 -0800 Message-Id: <20240223002627.1987886-1-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> References: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791647378352786847 X-GMAIL-MSGID: 1791647378352786847 Currently, if a Kconfig option depends on TASKS_RCU, it conditionally does "select TASKS_RCU if PREEMPTION". This works, but requires any change in this enablement logic to be replicated across all such "select" clauses. This commit therefore creates a new NEED_TASKS_RCU Kconfig option so that the default value of TASKS_RCU can depend on a combination of this new option and any needed enablement logic, so that this logic is in one place. While in the area, also anticipate a likely future change by adding PREEMPT_AUTO to that logic. Signed-off-by: Paul E. McKenney Cc: Ankur Arora Cc: Thomas Gleixner Cc: Mark Rutland Cc: Steven Rostedt --- kernel/rcu/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig index 7dca0138260c3..3e079de0f5b43 100644 --- a/kernel/rcu/Kconfig +++ b/kernel/rcu/Kconfig @@ -85,9 +85,13 @@ config FORCE_TASKS_RCU idle, and user-mode execution as quiescent states. Not for manual selection in most cases. -config TASKS_RCU +config NEED_TASKS_RCU bool default n + +config TASKS_RCU + bool + default NEED_TASKS_RCU && (PREEMPTION || PREEMPT_AUTO) select IRQ_WORK config FORCE_TASKS_RUDE_RCU From patchwork Fri Feb 23 00:26:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 205153 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp301984dyb; Thu, 22 Feb 2024 16:27:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWzZFe5sl8x9lETFhl9G5JDlavC2uwXwyiPM+wZewHpXH0xxAqVY/F0MwObbuJGiBnwwV0FBwy/7ExYijfYBHuAD6eNfg== X-Google-Smtp-Source: AGHT+IE0XKBGyp943rBaEBcVt6n3URK7nKzZEAvrYYjvpDpthCcOO1Jv0S3d51ggPg7mx1FS7Psa X-Received: by 2002:ac2:4304:0:b0:512:ae18:74a1 with SMTP id l4-20020ac24304000000b00512ae1874a1mr356953lfh.11.1708648049046; Thu, 22 Feb 2024 16:27:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708648049; cv=pass; d=google.com; s=arc-20160816; b=OKAL2/rWCvaEQgB7oUdhfG2bEUpEUMhvZP+697hR66qaEIpWJbPCoMnSBTib3ZJfxZ GIrx/oi/DLu+vIdRGNaKfc38STVh9gkMchxpViEY6cndtFcpvBXsD2Gvr26W52JVRb/U AILvWW6neSveQ9eMXvvARFmvoMQmOkq4rEdbejqrCNueoFfdTk1k7FbwzxSHepsm8CT3 alqCcQbbdKIg+Mlpg1zCqWOhW7wu+30hgeAinlaHEqYBNB4dmyY0caulUDogbHjykidj xtefSF8VVAx3bpHzKNlqTaDiyUHTZ/VBHfTBruA15MTChG6/frtKIxDpEbPGEjztyWeg zFBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=qV90ve+Z3eb8n/eo5CI4C7/HUrtdiz661RZiHDJO/MY=; fh=V8h8Z8DDBzDlZ6Ih2RdN2nnQ1uRbl+35AuOrjFzoD7A=; b=jKeV4IyBuSFnOfBPB0C+h2g50OZ+LUGa+54I16Z5DeHlutbtmcw5aDYoPt3+FvNHC+ uWX2OH/FY7srXfa/yCBtgECJrEAnMvb5P3SZlD2M/2fWUQJ9UHZfpTUjfRnPj2CQKgbv HIa6tmOJtJi0bLZhG0Mff13Q2Xb4Tf26G7U1HUJVAqFpYcnrk92qcj+9Kn7XPbB3pw8W 1hQTOVsiIzwL79sxWzGLkhqri/AYXgwZtb89sO7XMD4xsrZG5M+NwlWlWf+EfXlaKY6p A8+T502Fw7hnSYJoji1idtNbKsiKPOtCztm1nuD4ZjpxV0WTdoPQqYdBOpJtiB7AenNF aNyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qrrUXwLj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77574-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m3-20020a170906720300b00a3d98a92e5bsi5569894ejk.266.2024.02.22.16.27.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 16:27:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qrrUXwLj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77574-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9106F1F24A40 for ; Fri, 23 Feb 2024 00:27:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A441A95C; Fri, 23 Feb 2024 00:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qrrUXwLj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9461387; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; cv=none; b=Z9cS/e9F1U4DiGvGLiopA4FFV++0zeXV2cUtyklgaqu/7HD160PnN6HhvabB9l+slWARNK172OU5ErDX7vpUhA7G4VubVR3q1a/ArR9P2F+7aR9xqKhdZzES3wdIZ/aZYQH7pjIrbjn2bRCZMnIY1KTg2gwwYXYCoKpzfYZyt5g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; c=relaxed/simple; bh=7rZzzwXD4Z2+E6P0fKAU3ZQs833j/2iAWSnMfUO5kvE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dsbWBXCb2rZOJnEXgPMiRQH8DB7lLCe1fyhNZHm46rZIinDCtYkPs64Y4oxImUcyuM7Pgtd2jMAyXukDeNlmpZ/gSPPBg3N7tlvL9TDGizM51aW0thOjaJ9QYusUt5NbNLaS3wrgjXGyVmYp8FN9jMkiD5ohvVVfRHRMBw51bBA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qrrUXwLj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5769CC43394; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708647989; bh=7rZzzwXD4Z2+E6P0fKAU3ZQs833j/2iAWSnMfUO5kvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qrrUXwLjZvHoy6CLd4OlO+2bIHZDqW3lS4qoaGNvh0rMHe0KzwvmECCl28rabN4qV sEhxC74EE6d7XdFPrtDDS9npsDp1XYj066IuUm9lsiAVT72sr3/LxfbF9cipwkgyZs tFtwFpPOgLWaaIYrJt+BOLssM9lwaO5+V0HsMls4/9TCa4iTTL4aRLHZ6QsXGo3FEg yAQeeUItjfOXYa7q0/+mdCydHGmlIv7dhqdbL7e3+G5ezYthBN1t8yylM8KJZj+eef LNEsBwapBlgdJmQj7yTdbKzBeyPRpCL4UGXhP+MAFX4HDJxoQbp+oUMpjdLzPbkJSN AB0JM/mtmp0mw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id EFF9ECE0CC1; Thu, 22 Feb 2024 16:26:28 -0800 (PST) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, Ankur Arora , Thomas Gleixner , Mark Rutland Subject: [PATCH rcu 2/4] bpf: Select new NEED_TASKS_RCU Kconfig option Date: Thu, 22 Feb 2024 16:26:25 -0800 Message-Id: <20240223002627.1987886-2-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> References: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791647336428359005 X-GMAIL-MSGID: 1791647336428359005 Currently, if a Kconfig option depends on TASKS_RCU, it conditionally does "select TASKS_RCU if PREEMPTION". This works, but requires any change in this enablement logic to be replicated across all such "select" clauses. A new NEED_TASKS_RCU Kconfig option has been created to allow this enablement logic to be in one place in kernel/rcu/Kconfig. Therefore, make BPF select the new NEED_TASKS_RCU Kconfig option. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: KP Singh Cc: Stanislav Fomichev Cc: Hao Luo Cc: Jiri Olsa Cc: Cc: Ankur Arora Cc: Thomas Gleixner Cc: Mark Rutland Cc: Steven Rostedt --- kernel/bpf/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig index 6a906ff930065..ce9fbc3b27ecf 100644 --- a/kernel/bpf/Kconfig +++ b/kernel/bpf/Kconfig @@ -27,7 +27,7 @@ config BPF_SYSCALL bool "Enable bpf() system call" select BPF select IRQ_WORK - select TASKS_RCU if PREEMPTION + select NEED_TASKS_RCU select TASKS_TRACE_RCU select BINARY_PRINTF select NET_SOCK_MSG if NET From patchwork Fri Feb 23 00:26:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 205152 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp301969dyb; Thu, 22 Feb 2024 16:27:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWodpV/jweRY69mSX4G33FAI3AJJ4YA/ox8Drv3nvUomEORgLuVg5/MaED0C7GvpQ19FwOJsojFR7W3Bg4SEVHqetVH5A== X-Google-Smtp-Source: AGHT+IFofQTXJM7ZUtvPhV0o1lD/Bf9Fl9cAw31HjyFbutVYEQZLwizKLtQjV11ZIFXQcQGMPoyC X-Received: by 2002:a17:903:292:b0:1d9:a2d3:8127 with SMTP id j18-20020a170903029200b001d9a2d38127mr660875plr.52.1708648046150; Thu, 22 Feb 2024 16:27:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708648046; cv=pass; d=google.com; s=arc-20160816; b=i+0NfNQMzQ7FxWSKmL0YsKPMPsIklq7G+BkoNy0BfGbcntxb4A85hkPiji/La2acDl 0VFUhvJnLlIICZd5d7wA/pq+vTAWJ0tTLnvnWmZ4MAFGi91QPYpmowh7a3edyuK3FGpb nM+VfS/6kuzV9I8y0kbeWZ4Bb9bFMmDQ1PlMqgjgmCeZ+XW2P2+B6V9PpYpuQrtPo+4h BAOXdL8mDHIsUHRra1eREQ4dmEKHJ3KphHejCvbVXSVzjFrsLplKlchYA43RQ5xV2X/h L11wIN/FagB2KOd75NcOxHO/P4G0zP+FifsFYeFzL66bgNyVeZGevEvrA7XaBIUh0ncY RU+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=w83ACVJ1ofrhsZowgoNrhEME9HcLDpKgkBW4lr15nsM=; fh=ykQsgMYDzcOff9JXnhaWTMmjnOpmcSMiMnBbHuDT7co=; b=kVc2yHQOI8lZrC/M9PckI2+j/L2J1xk4bDvxq9VDUeVkVOcjCXKtsrPd5wdhQoQN5X v2bAADnegD/ZlfJNDYp7/bwrOxNINtM86CrKhruPqLNEUd1r/NXR7kDiQJ+8Wwijd2ld XyQL/EoCysrzilQptsZkFpydSkpjVQLfg8PzQzGIPKRqveMsxzV4sGzyj6gCyVzCx0rN GptEcv5dF9yOkftd77Xl/n7uXrNrGoj7nixP/YtDkLz6MfWRQ4NzmbuvUIca93Em3NvU gjCGTUTkOn+Ai6hGFmNTLihpCbQ4/w0ZLxPn5LbusJ3WKdidcV/1BRxOVDlajREI9qI7 1gTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qCTyFMCj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77572-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77572-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k8-20020a170902ba8800b001d936b75f10si518067pls.267.2024.02.22.16.27.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 16:27:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77572-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qCTyFMCj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77572-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77572-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F1F362867A1 for ; Fri, 23 Feb 2024 00:27:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C51CA953; Fri, 23 Feb 2024 00:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qCTyFMCj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A943637C; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; cv=none; b=dkgnQcct+MYI8UnHOB0VDj5iWp4TUxXT7hiwrIGX8FqTTgsteuUhOhD0qRXVTdllZHVghe++9Ld0tHX1O4xZ1ievkeOTx1RJfF/379PysNkwx60IMEPDihrnkyN8hQWhDAhdNUM/XHa+bKqBwFTMKiekVtstJ/iVzsOCldE9arw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; c=relaxed/simple; bh=YJHlxUD/OoJ0p2sStlRJ0L83YeFXqQtRNbqzm4TpUZ0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Xp++rKzZyeRzd4RcZoIQ6lQRrPU2QZKBg0WWTPHrlhPK/ADx66WTfxUquksHf1PgJk9agtktJqbs7vyqJN1o+aSXfWN0pza9rVM3L+4i9cgmyXtlxnH0Nm48aZaAAz8rjGB0xQZUVfKvaI6EirRVTrYiDKwl78yHkhLRLuxGKsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qCTyFMCj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EFFBC43399; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708647989; bh=YJHlxUD/OoJ0p2sStlRJ0L83YeFXqQtRNbqzm4TpUZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qCTyFMCj76ttTJk+FnrqikZSBryBEHKqLEEVxT3jCYfiKeZdIEMFa3Q9CX9Q8gMFz gswhQjnjw21nIhg+FAx6eVynOcN7rkbEc5Yugf3TVgAZ9t1XgumfYX8dEvMppaBPRk omD77vwUgTcQOuNxkiomgWDLSBTpjwpAnBlo13Ip4wIw4lV6Ww4sivkQy5eb4lq5yL eK131CP+TipF/RH9rgd9AJiHyOIH2sTSBGArSA8QPcjTXOLcK8228QP/EBwrieZMEb B0aV44xWzv2D7afRH1KfhxEOJ6uMPf02GKQxYZ9t2eBM5w1r02QhCtXGrH+AYBoGrp 2p/5xHutzXGcQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id F2CDDCE0D11; Thu, 22 Feb 2024 16:26:28 -0800 (PST) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" , Andrew Morton , Thomas Gleixner , Heiko Carstens , Arnd Bergmann , Douglas Anderson , Ankur Arora , Mark Rutland Subject: [PATCH rcu 3/4] arch: Select new NEED_TASKS_RCU Kconfig option Date: Thu, 22 Feb 2024 16:26:26 -0800 Message-Id: <20240223002627.1987886-3-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> References: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791647333734795946 X-GMAIL-MSGID: 1791647333734795946 Currently, if a Kconfig option depends on TASKS_RCU, it conditionally does "select TASKS_RCU if PREEMPTION". This works, but requires any change in this enablement logic to be replicated across all such "select" clauses. A new NEED_TASKS_RCU Kconfig option has been created to allow this enablement logic to be in one place in kernel/rcu/Kconfig. Therefore, select the new NEED_TASKS_RCU Kconfig option instead of the old TASKS_RCU option. Signed-off-by: Paul E. McKenney Cc: Andrew Morton Cc: Thomas Gleixner Cc: Heiko Carstens Cc: Arnd Bergmann Cc: Douglas Anderson Cc: Ankur Arora Cc: Mark Rutland Cc: Steven Rostedt Reviewed-by: Steven Rostedt (Google) --- arch/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index c91917b508736..154f994547632 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -55,7 +55,7 @@ config KPROBES depends on MODULES depends on HAVE_KPROBES select KALLSYMS - select TASKS_RCU if PREEMPTION + select NEED_TASKS_RCU help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes @@ -104,7 +104,7 @@ config STATIC_CALL_SELFTEST config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES - select TASKS_RCU if PREEMPTION + select NEED_TASKS_RCU config KPROBES_ON_FTRACE def_bool y From patchwork Fri Feb 23 00:26:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 205151 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp301965dyb; Thu, 22 Feb 2024 16:27:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUrpX4IVCwr+4pfOgPcjKKc9aQwnqRkco0UkLVzmIDGgfKGR3QMxxfwf2pPbwjDz6wNLF8XkY3CV5u3HQToTA7WsRAVZg== X-Google-Smtp-Source: AGHT+IGCyTfcQ/lcRtdxTjp/P8XssS8MDWQ+rF08IqURachHGmqx7OYjZNqfKZd5+kyHuj02QVxv X-Received: by 2002:ac2:5492:0:b0:512:e392:1c5d with SMTP id t18-20020ac25492000000b00512e3921c5dmr342161lfk.35.1708648045785; Thu, 22 Feb 2024 16:27:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708648045; cv=pass; d=google.com; s=arc-20160816; b=oZt01HvnKH+XVpraQyK78hWYjaalyrX8rrWiidC8RYBcK3D92DjaZi434SS+EJmrwz P9oNhNLYekTEtqSu4DiDa1+w8Y1Weym00/hRgvLrWO9OYTMkUDBU38zIvEQzvGYfo1+/ 75Jyv9N82hPlT4Sw28UyJp++jP5NmMxkd8DwJIGB+5k7xxokUyBBoKHU1U/UGSwPee0k NJ3nE0UddRxy4Lxr2+6VaYH9roY2uzRXYljqjvsd1jHMkSmU+EG1SjIl+frx0dpyLqwM HpyDvMt+1q5xwLW4hM9U6Hibowy4McZkBaMZ50vGBG1REvkj3BGFccCezPxp/Ecl2RB4 OtWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=aYuPlN1WToxCy0FGJnR3LIf81uzKV2w8VLm7C/zW6Lk=; fh=5uVZsHiVLmuymoYQ8qb5OgQezxWGIhC4Ypp1VPaX9XM=; b=d+9Cfev63WE2mwwryD9ld87dac76fSzHQqBmAyxx61Xjx5Rk3UnsXjXPOOHnyreeYj muY0bOQb7ZnCs3iQfUHMSKbwZ/Y7WzTQ6RNr529+zCrhusSnZImM3/zWDoVh5CzysSPh gpvhCXjdJLoiqt0DPkPxqjum0oN8a0C+I0tLZ82Y43ewQD0czjv/F/VjG1+pTytCDqh5 HvkxToDOksGoU1ztwLpRxVHOLoxHodO3gl6Mk9sTibWDat/eBGDjfFwUzNvqjZ+aXWW2 +cGXGtBuCDt6qyEwJmvK/kHmWlsWjwZdP08WTyaTO8X7ScrfiyGstyIkYW/j9Bzwgy0+ godQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gmI/c/Mi"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77571-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77571-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hq33-20020a1709073f2100b00a3f10e5edadsi2668173ejc.510.2024.02.22.16.27.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 16:27:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77571-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gmI/c/Mi"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77571-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77571-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5BA741F23D1E for ; Fri, 23 Feb 2024 00:27:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E439947A; Fri, 23 Feb 2024 00:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gmI/c/Mi" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D70C370; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; cv=none; b=D4XwvoS07DwQCZ4eOJeuaT+IN34KSA/wgDE2Gv0HZ+NSla8ltUgbnopaqNxN9ohS9mx7d2vKVUxbz4pupUw2WnvX0s9oTBV1mpXYPjA6JoOIrtR9wuAyiZOd854wc27/Q35hf1iK7GNMBF85TH5rkHnclwVSj+gZTfOiu/dgu9A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708647989; c=relaxed/simple; bh=2zq8t2w/MxvWtYHu7VdFtzRLQDoWQp7+hxBDYINDmR0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dzMuE7QhoUQlSihOXlqb+Gg+CNj+k52zpaoNSXhxVT/I+xJUm8LvDo/VLT4wTelP7n4VVs6u1zwberx1tAyL8FzjeCMwMC5vc6m7d9ZYjXezAPMXMCeiBuw4wVi+osJ5YAL2idrAsde22Yq07n+I6l7sFDu7XGx6/t+8YGFptnI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gmI/c/Mi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6720AC433B1; Fri, 23 Feb 2024 00:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708647989; bh=2zq8t2w/MxvWtYHu7VdFtzRLQDoWQp7+hxBDYINDmR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gmI/c/Miowmr1UpqRQQQoGics2HxdOzd8fXDF8ISzUC5IjbnXBd1ZybjLuCp1iIba 4gU8Kshs121y8K7jCR7609eYif/bP7zqwCjA9oFYDsTG11FcwOyCft7EXNc3vn4paq 8ID9r2qnpCHUdfeAMHBmn/7iA3AnRVbcHDBWEaKHRFjY3EVezdeu//7oP5Gvd+PIwn NBJfvHnT8Myev0TpkaX+Dcl66MVB5JYOz7MVJwWZapPIBSenFEDzRRdloVw0Yxq2d1 nz1+q0vP3hAbBC3mRLQRSfhC/QJWOBI5pUvoWEglHQ62CkWRD5BPjwUxDJVLGHc8jJ 1j1KmkuV50YNw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0140ECE0DD4; Thu, 22 Feb 2024 16:26:28 -0800 (PST) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" , Masami Hiramatsu , Mathieu Desnoyers , linux-trace-kernel@vger.kernel.org, Ankur Arora , Thomas Gleixner , Mark Rutland Subject: [PATCH rcu 4/4] tracing: Select new NEED_TASKS_RCU Kconfig option Date: Thu, 22 Feb 2024 16:26:27 -0800 Message-Id: <20240223002627.1987886-4-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> References: <8c938bd5-6d62-4eff-9289-13b0d7ae8e17@paulmck-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791647333505943900 X-GMAIL-MSGID: 1791647333505943900 Currently, if a Kconfig option depends on TASKS_RCU, it conditionally does "select TASKS_RCU if PREEMPTION". This works, but requires any change in this enablement logic to be replicated across all such "select" clauses. A new NEED_TASKS_RCU Kconfig option has been created to allow this enablement logic to be in one place in kernel/rcu/Kconfig. Therefore, select the new NEED_TASKS_RCU Kconfig option instead of the old TASKS_RCU option. Signed-off-by: Paul E. McKenney Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Cc: Ankur Arora Cc: Thomas Gleixner Cc: Mark Rutland --- kernel/trace/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 61c541c36596d..6cdc5ff919b09 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -163,7 +163,7 @@ config TRACING select BINARY_PRINTF select EVENT_TRACING select TRACE_CLOCK - select TASKS_RCU if PREEMPTION + select NEED_TASKS_RCU config GENERIC_TRACER bool @@ -204,7 +204,7 @@ config FUNCTION_TRACER select GENERIC_TRACER select CONTEXT_SWITCH_TRACER select GLOB - select TASKS_RCU if PREEMPTION + select NEED_TASKS_RCU select TASKS_RUDE_RCU help Enable the kernel to trace every kernel function. This is done