From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 778E0478E4A for ; Mon, 11 May 2026 17:54:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778522099; cv=none; b=jv9ulIt9wiwyrUNT99O+kBD8PCnZDLd46zoCfy3kZ15p0myipFU6FzRay3Hex8iKnDDX3SMIfw61WmeXvkD+wJ4vRJXgYTZODVjYtJ8Mu0delV2kdVopSnS2ePh2OhjTxTthga+4Pj4QZ6OONilmWYVAoiB9ERhDZ/25gE46PqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778522099; c=relaxed/simple; bh=yg95+jA4OYlmIgo8aira0sfiDymydxJc4HtaxzIjeEY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WGd3Skgy5ds58tR5HQyd24Hhx2Z+TfeS3Q9Q1QQnGomYJeW0B/maaVRdmdBcwiS8i3M1KfzOTciATDBGxL94cLiJzdGjcAbrrG6SyzjzVCP/mGKx9RbGQqc7ijHDgVBB6QZhAxGEbTNnl4ssI/a58uOCHLU7LYAaJ2j2VfGeLqU= 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=p3MU2aUA; arc=none smtp.client-ip=209.85.208.182 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p3MU2aUA" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-393a49d2e5eso39257751fa.2 for ; Mon, 11 May 2026 10:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778522096; x=1779126896; 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=AFj4IX7pq0ONh+1KWCITkzOOtXQ9yoQpVR86RbaYawI=; b=p3MU2aUARkCvcDmRt2fQMHJcUFDqMd7RGb+iAFIXZdDrexpy6tHTupRzLujP4Q3Xnc e3e4bJcO2I+dtkaMfupr2OA/WnngH2p0wL83qDj4JxjhGDTeqe5rVWOJ39rzTO7AoNfO kdews+gM3eBeVATqtjUElMC6qfwKJcQrx4PPIdnvYQEAD3vSkEcDJABw4lVa88qAUHBx NGgTyk7DJ9Ia+PsL7/qlh6kV/F/B7RZNsKo4bgr/5wI66iuneddC0yAN6hxcaL7TK7k6 o83mLqmclSbCTZXVOsHYetF90WkbGebMWwZRJIAazq3XNDKB2FkHIZ4tnmetVrtq4DUr +H0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778522096; x=1779126896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AFj4IX7pq0ONh+1KWCITkzOOtXQ9yoQpVR86RbaYawI=; b=msAZm31vGHDnVnHAsf69BpSPWvtyReneQEwRS4oJp2f73Fm00Ta+dur7gb8iWVTScs PwYiNlSH2GF3BibShNKsD9JEs8339g145M8IElR/p6SCL0jxnR6H30zK8twQRLPZHSG7 alexQnDXkFVLvze3KpWcLOlhy26Komt599jtPLoDFBsyW1+SSNWe3PmmRudryzKbHPpb OIPDsUVU7vUOQ/wl4KtehgXUaTx76TdBTFwaUkO5YKAg2ZgwD9hcJdOGRQs/ugoK8DLe lkBtPG7Z7+nZThBNw+z98+VO49BGU2lkp9bxtcOXZL5se/OAWRTC4MHn5PcLLDuARTMl mytQ== X-Forwarded-Encrypted: i=1; AFNElJ/KZWv7ZrcXEfMyG8nJ4T69E1/dL2EpFubAhQolULC3WH/ouTzMRHwpS77XV/eFhZ1Sv4VEXk0Qw7mAIQ8=@vger.kernel.org X-Gm-Message-State: AOJu0YxVVU5UOyxqxEsYCCnmbsQxuQeW3GG+rhENzZnC8XZIoJ/Hg/+e zie9KoVN7DCs+QzdZ8auOkg5MLbSe8MwRjnktIgfdS6TEJzg0IyiJqzZ X-Gm-Gg: Acq92OFZ4DIUn/ogTZWTg2ollA6B3L5z3RByQ/c2jXRE7oPkAEvXEQmLJaZERSa2zvK 6aRmFJRx7FjV0zk/KiSEb8lWvQu1F+wGB374O1RRKRyfnYeZq7PWnptMI0rU9d5DRB0lnb3NDNc byBKLKorjKJd8AoJgVCLpB/eeVzDNcuWyNeHOi2osdHpPcUMtPHaZttcRphZrjCyqiSN5X0rvv0 zTi9D6dEWYHWhiPTBen66/wocn/1ZX2umR0JW0d6IiF5WI0LYVwg8x6xk4rGCwxAco8+9nFSVMn opICPt5v014KHUAHmbqOmSJlUf3BvYxttMLTm9sJ+MSsIcgb6/IlWJ3m4O9M9WtZMVD5lTRz4PT tgVc4N2fuxjSs+IiviraMBZAYXsObIUxoBrwlIxBzXi6fjY3m2/I/tilp8j3iRlaHQXw1m6Bl5t L7CBRYfYpVk2fj4JJrVP6+WHZeDg== X-Received: by 2002:a2e:be14:0:b0:393:5920:2c5d with SMTP id 38308e7fff4ca-393c432462bmr104321521fa.28.1778522095555; Mon, 11 May 2026 10:54:55 -0700 (PDT) Received: from localhost.localdomain ([2001:9b1:d5a0:a500::24b]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-393f614a5f4sm28968891fa.33.2026.05.11.10.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 10:54:55 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: "Paul E . McKenney" , Joel Fernandes , Frederic Weisbecker , Boqun Feng Cc: RCU , LKML , Uladzislau Rezki , Puranjay Mohan , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Subject: [PATCH -next v1 07/12] checkpatch: Undeprecate rcu_read_lock_trace() and rcu_read_unlock_trace() Date: Mon, 11 May 2026 19:54:43 +0200 Message-ID: <20260511175448.153326-8-urezki@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260511175448.153326-1-urezki@gmail.com> References: <20260511175448.153326-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" It turns out that there are BPF use cases that rely on nesting RCU Tasks Trace readers. These use cases are well-served by the old rcu_read_lock_trace() and rcu_read_unlock_trace() functions that maintain a nesting counter in the task_struct structure. But these use cases incur a performance penalty when using the shiny new rcu_read_lock_tasks_trace() and rcu_read_unlock_tasks_trace() functions, which nest in the same way that SRCU does. This means that rcu_read_lock_trace() and rcu_read_unlock_trace() will be with us for some time. Therefore, remove the checkpatch.pl deprecation. Also, the rcu_read_lock_tasks_trace() and rcu_read_unlock_tasks_trace() functions are intended for use only by BPF. Therefore, add them to the list of functions that checkpatch complains about outside of BPF (and of course, RCU). Reported-by: Puranjay Mohan Signed-off-by: Paul E. McKenney Cc: Andy Whitcroft Cc: Joe Perches Cc: Dwaipayan Ray Cc: Lukas Bulwahn Signed-off-by: Uladzislau Rezki (Sony) --- scripts/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0492d6afc9a1..cc5bbd70cb84 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -865,8 +865,6 @@ our %deprecated_apis = ( "DEFINE_IDR" => "DEFINE_XARRAY", "idr_init" => "xa_init", "idr_init_base" => "xa_init_flags", - "rcu_read_lock_trace" => "rcu_read_lock_tasks_trace", - "rcu_read_unlock_trace" => "rcu_read_unlock_tasks_trace", ); #Create a search pattern for all these strings to speed up a loop below @@ -7596,12 +7594,15 @@ sub process { # Complain about RCU Tasks Trace used outside of BPF (and of course, RCU). our $rcu_trace_funcs = qr{(?x: + rcu_read_lock_tasks_trace | rcu_read_lock_trace | rcu_read_lock_trace_held | rcu_read_unlock_trace | + rcu_read_unlock_tasks_trace | call_rcu_tasks_trace | synchronize_rcu_tasks_trace | rcu_barrier_tasks_trace | + rcu_tasks_trace_expedite_current | rcu_request_urgent_qs_task )}; our $rcu_trace_paths = qr{(?x: -- 2.47.3