Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp400031lqh; Tue, 7 May 2024 02:40:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU72CObdOxSk2clp0GVEOewFfsYeD1jVmjAJvn34iR2YTwBe/FCWhSv3ZpRZDxF99ty9+IRRhJ3/mhN13vuY/pqcubuE14x9wkggpe3Mg== X-Google-Smtp-Source: AGHT+IEQFPeGcCpEBFr5kANuBiXipU8dcBK7YNuieKArzsKi/7aNWw8XYKlmTl9IBJpc3wjFM90q X-Received: by 2002:ac8:5fd0:0:b0:43a:f0b5:9885 with SMTP id k16-20020ac85fd0000000b0043af0b59885mr3060262qta.10.1715074831518; Tue, 07 May 2024 02:40:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715074831; cv=pass; d=google.com; s=arc-20160816; b=qAuEyziTwKImwvuMzh2eEdkHG40oVBJB2lBoDtGX5Hk+mu00AwcOAA7zjFdNfbClnu wip6Kf41QG2+WTLaUDSygKkPoqbxqve6nNkYeWVYI5cmKGhiaG9+S3HHEVYwIMa746SR CktyC9kjrxd3UR3ZVfRjNhpEL0VJO2aL7AI06b/2NeKg0sFJcP41ddBAmd8FQVOeR06N iuifJop9LatmATz7OCn4zfdfREBMA6WKWJOCuXqpjoTWlRvQuLxdbKE9kcgMwnO3kygk 8Yz0C6yb9s5N7XOcXhG4jWo60iMiH10aalJejTi2Cqi2NnQVN77appLM6YPtvCvZNa8A VYww== 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=Pp3uSRTGzyTrrsXKNuVnjxaJ4vNThArGqCT0EkGmYcg=; fh=cmzutpzMZSN+bqtV4XIjtrfP0CQUpLrpCmrsdT803qE=; b=TUGc31ohnwh8B8cwAZYwj0tVGmpkygmALGuyDf2nLZCm6DPuf0l+0gCNArwQNcP2NK Gv9ru4zf5JQL8MMhixHfBXMegAcZQDzgB/PUz1xJtZguhkOFbcJPLvNusVFlrKhjAprG AWwURfY3ke9vJrMA2v7TTaVpnEt6AdCag6VZMswO0LoFX7kEkcMUP0T0rta1xjnLfZKE Lw8I3ialKyROug6eAEJctfDIQ8+I/3E0OGPPcZrQ3hC2ZE4xJZd+LvsKOp94auV4BL+S 32L72ZjSlubt2bLVFQHM0U4Ew9VsY0HT3wM7FfjBUItcWS5ER9fkcJiNGBxYSFKrZQjj JN5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EOE9b1mN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-170979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c6-20020ac87d86000000b0043acbc18507si12006646qtd.145.2024.05.07.02.40.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:40:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EOE9b1mN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-170979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 412B01C2325B for ; Tue, 7 May 2024 09:40:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39A7D15E5C4; Tue, 7 May 2024 09:35:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EOE9b1mN" Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBEA715E5AE; Tue, 7 May 2024 09:35:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074556; cv=none; b=hXlHrj9B9cYyUlihqAxjBYri4uNT5kof1i2bUHMyXX9WUTCAfKjAnbK2KhNy00ezgdzwsG/BERwmHABzov+rnCayWDxTnX5u8jyW9cDgWdFnQfn4IpoL3MgHQ/+4s8cU8m455yQ1+3Nyv1p3L8x+ShR/WjJHfL5/i5lT/X1xquo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715074556; c=relaxed/simple; bh=1h5PTnEjN3XTAEqeqf7c//E2/U6L7mwbdJGy/pN+PlU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F8Tbde0AFir726XfPtjEUnwTlQ/Fhw0qf8zj7zUM5PdPTv77z+dJ0NlZXesZgxtgIt0vR8t4viTOjEtSbkpytBZGKXNf4OWE/v9QmA4Gf7sLUVFUuWXLvHYyxC0orSj7e66F2T2nVUoL4SoPjcmRroGpwYbg+/BuxCuyJM94sJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EOE9b1mN; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2df9af57b5eso38860561fa.2; Tue, 07 May 2024 02:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715074552; x=1715679352; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Pp3uSRTGzyTrrsXKNuVnjxaJ4vNThArGqCT0EkGmYcg=; b=EOE9b1mN729TAe548gtngGm6HviMcXY8bpaGi8vjIrTO9ETLmsDDAK0INMuNC7RtJA GGfcJaiH5VKQjYl4m0c2W1RNsBDsA3kMh1u01XTGPfm2OxfM54Zm45GCaFzYtODF3tyX bhETmzRc+hmNN37e6xB9g++MGHnidTQdB2GNdMReVZwI/AwBabI6v5CSsalu3nKb/KjL suZG9gkbw8Yl1br5/LPIm7wD888/7dmb0iq8etXv+VopnEF4HHCSuqPPyODjvqRErTUH N4/gfE7EBT5UE7BgLa1Ax7MHBu8NWEGC+2U3quHZGOYzdSrm0hwb2i/CUE3uxaohQBbY Fi0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715074552; x=1715679352; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pp3uSRTGzyTrrsXKNuVnjxaJ4vNThArGqCT0EkGmYcg=; b=AWzs0qVSaYei5Ca5Jj39uEG+d6L1Ze86A6fAw2Tw+lGJcHBE8zfUN5MPhzNj/rt3qj 0EPeebyTfWNRgnsnJCJBR6C+YZN8O8Uj6t/MW/wjiQ41Qpvz7XtZbP3pur3X8vV+aRVR zcGkX12NTnhWMUq+ZRsz9hIpaQD32WXieRYTbLpnElQPuYh9/aga2kYTud6jVIodqlUL kOo1gDa69aj925f9rEwFSIIu9CxgseFr1o4PoLAb0w+6BhV66S7eMbojsRsVSckUjlvg uFdTFa5L1vAP5whmUHHMnZIrnU9bGcY/6LYTzUovhPt+tfu3yRlfbEBgNEzYrf9YIbCJ sMtA== X-Forwarded-Encrypted: i=1; AJvYcCVN194zQzSqj9eLv62CPiJ2ICQ1vYHOaT+WfHW/IKpeNl5qE4sMmmjDU6CP9VNvtwYLbeKteEy8KP0UtfHCpIPy6o2NYkoPBJvFDY3i X-Gm-Message-State: AOJu0YyBW1vNPyUTAH0fRvQMuznwXRt5/Ry8V8jRvj5lATHCijZnKlve Ep/ZPmIg1SJ17s+/yxtQ4ec0+rJ787+FIWyrsJUhEUB2bMsTWM0Z X-Received: by 2002:a2e:be8e:0:b0:2dd:cb34:ddbc with SMTP id a14-20020a2ebe8e000000b002ddcb34ddbcmr12375237ljr.48.1715074552165; Tue, 07 May 2024 02:35:52 -0700 (PDT) Received: from pc638.lan (host-185-121-47-193.sydskane.nu. [185.121.47.193]) by smtp.gmail.com with ESMTPSA id t18-20020a2e9d12000000b002e29c50c4dcsm1335473lji.27.2024.05.07.02.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:35:51 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: "Paul E . McKenney" Cc: RCU , Neeraj upadhyay , Boqun Feng , Hillf Danton , Joel Fernandes , LKML , Uladzislau Rezki , Oleksiy Avramchenko , Frederic Weisbecker , Ankur Arora , Thomas Gleixner , Steven Rostedt , Mark Rutland Subject: [PATCH 20/48] rcu: Create NEED_TASKS_RCU to factor out enablement logic Date: Tue, 7 May 2024 11:35:02 +0200 Message-Id: <20240507093530.3043-21-urezki@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240507093530.3043-1-urezki@gmail.com> References: <20240507093530.3043-1-urezki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Paul E. McKenney" 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: Steven Rostedt Acked-by: Mark Rutland Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig index 7dca0138260c..3e079de0f5b4 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 -- 2.39.2