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 997ED3B583C for ; Tue, 19 May 2026 19:45:31 +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=1779219933; cv=none; b=DhBWXHIIt44pl5bcEPUdSKC/iQ3QXiDBQ+Y0KdvV7FrF3SMASqoxsU7pTJZjnE/8vs8I45B/unTkgBcGl5PLRpvtPbGfJsfP9WIsjSWpgrnRQ2EmEFCrpG1uSRqJTTVwW7aK7fi1OCdZDk53YBnmkcogN3DSzQBWHxsLf2A88kM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779219933; c=relaxed/simple; bh=yg95+jA4OYlmIgo8aira0sfiDymydxJc4HtaxzIjeEY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=byguIUC4spmMunuE72Rk4kPJrlO6qVum+1aoe9C+eIYW8ekV4xOuPS30MttOvnm6bxrWj08qEddmGq77hMuB2vpmhqpVjfYpKtMJMZJWrst7RELCQY+8DphkG/6uxQelh3qcv4AyE47abjow08ZSjQeVwQ7aMIBiNaZDYx0EBXE= 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=GeRou4nT; 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="GeRou4nT" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-3939d2bd7ecso31878681fa.0 for ; Tue, 19 May 2026 12:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779219930; x=1779824730; 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=GeRou4nTJvMf5XlDAYHVy0+XnuYv5a250c+UAnUKrAPilRIgG8PcwbKcvb4ujlK2nh XhqjYA0EhvHToU29jW9tLzfxQ++AnSxNcb11otRrn5SQDvXVGxaT+FJdeV+YSycvF1nT wcTLZerPVzrujrCaMoOHsE9Li4lEoHF96FwKxUnjwb37SJS1Yvz0X3idTtjYm4JassXj McT4X10dw9n50cadmlJI6I24Za/rUutolUNkFVhxTsOYd7lTgS9MmhH8SnIk0H/b8tOP MS9a3alirydrkoIgiJHcsUwTVNqhN0qFG2scm/ZgkT4zFIPQqf2WbnO77THHhWQjnvWZ rr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779219930; x=1779824730; 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=TWu+iXNRNcLK3Wn8i0D4csDN1Xw7b2pN6hA0ixQclOg5XshP2HEd4ePGlRu3KV7m+g gXtqLoo+orRlx10gzgFc2AGaQWPvmpwHcJkVclFmWVa+dcK9gHMxpT/4VkLVsdB8WNSA yobPevE+FzFjrFO2qQAd2uoHRL4P3myZ5Swd5QHiWUXWufkE+xQsUJwpAoFZzr4jxWNX +ANDa1gRICgfGWRN3Hm9Pewlf3zcIxDmnMc+bIYzFwFWul2s6dktIZzBa+hNepTgANh/ +GQRZrH0DUdJb2G9tQyd+Px3H9hp71fMbK9wS9vkFXPzDRS1TYBPgDmJTszJ/cyacE4+ IDOg== X-Forwarded-Encrypted: i=1; AFNElJ8d85njD7CEhJk7O7dfF4w0gVq9h8Wbo137vb3bzirYQnsy14cAqykkJV8v+UJiYQT81X8xtFxReqQMM3s=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3P0tLgsBHJe8B7oqRy2TiYmFg6nbO8FJfJTQewZqxOskVJGq/ 6EnYEJiGpWzGIbUctc0ulF6TKYgolQfER9zZ1Unu+7Ty1Ix/Y0rqPbkQ X-Gm-Gg: Acq92OF0VbWndR1RrzATXNS2g8zh8hDMWES4lkJ9y5p9wjB1EjhPln6iXTjW0IODjne NxcOX3p/hMvPh0ZE/r9HVpdX1pi8Ulo5ncpxDUzSUbKSdkztioJ2M3WfkCT6ATWb4leEHkvwxNX 81u4UZmdUr9ZzXMz2sBDdThKS3uT/I7nvxtX/Fq1a5ZIQCF+CBVv6hlZdORlz6K+l/5olBDyegz oZbL5vDrx3bfHKR3Rl/+wxA97ZiFzxZO2Jj1NHadcWubyCfDfkWICIUnT1f9qJghvouBsxsGwea 31nwBRYEI8z7d1hXBlasAz9YyTExTZ2lRsr3ID0sGCjQPgYdlbqE+nH4GJ58V6bqykvzktdp8a/ TPr7SIhQhrQM21QzeKMqHikvB4r7qq+njk6tXxSb/RCr7xV5gXVDhxX+gaHkepWir+cEoJTWkro qvrxVtfvJLD8I2W74= X-Received: by 2002:a2e:bd03:0:b0:38e:866c:4340 with SMTP id 38308e7fff4ca-395608e83dbmr61040481fa.6.1779219929771; Tue, 19 May 2026 12:45:29 -0700 (PDT) Received: from localhost.localdomain ([2001:9b1:d5a0:a500::24b]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3958827ec3fsm23558761fa.9.2026.05.19.12.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2026 12:45:29 -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 v2 06/11] checkpatch: Undeprecate rcu_read_lock_trace() and rcu_read_unlock_trace() Date: Tue, 19 May 2026 21:45:19 +0200 Message-ID: <20260519194524.158515-7-urezki@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260519194524.158515-1-urezki@gmail.com> References: <20260519194524.158515-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