Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp376600rdb; Thu, 25 Jan 2024 20:00:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHUOxPobo8F/ihDoip+r4IuWcVzQbr98oFmVSCxb9RJ67cAxHKVsZHOdza7sCh3OUJC4q+ X-Received: by 2002:a05:620a:55a3:b0:783:a539:8fb with SMTP id vr3-20020a05620a55a300b00783a53908fbmr789731qkn.69.1706241633297; Thu, 25 Jan 2024 20:00:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706241633; cv=pass; d=google.com; s=arc-20160816; b=UsCRZOcJWGhJNgLZhrvUVx4J/ntQUlc2wQiewBqo6nDqQcYA3tsI1+6wqMMxHsoeRu WianuGXYRE0flxfvlR6ZNWDsCsRmz3PWZalDIQjjDmTbbnj8RIPtbqQr85WKsvfPvLGN ZurT+D/Kpyc6cPy+1QjJHHGqYO+P3Up5QQ+/WKNu5lDlu149HREdEvJQ7ODk5bVgNA8h QWIqERXg6UNs0fPwpFkS61SD6ABYrQGWJPpLe+5ceDZmBa4UFjnH0boQ39FMwZeC0Vib zZwlQAkgvTEFk/PDt2jdKdJq0z0vziwq99WrznD/JZ2oG320NHScgAZYbYhnxoRVpIaY dl7w== 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:feedback-id:dkim-signature; bh=Ec+oZMGt7I/sXDo2HDWfHkpmX9raXfcV0tRYDCJOyxY=; fh=y2vSzkQ01DsnkYIHdHJwJuTjfZx9EXWe7xvme7T4GVA=; b=QWiwcT3y9tEJf4ptKB1+amZ1lJNAWX0MH6eKb7SbtgSjXeqJWtt76GTiV3OrqD9zbu EeVpni5Ikq757KKXDVq2M88jRu4tfHIvgTr1rf4czDmE3IpN2wkqnwseIGrS7mh6vrS5 hkt1VJJp6qEz3Fw+eyF4PiDCta4RFJcTt+eWYehH4MT+u0ieZzyyzfBqEdzdCo44ctDS vm1Fg39dtXqhsC8gYbgWkWND9OneBE0OsUXMwyHdwDm4x1Mjf0K6dloIO2ctkBPuM/qZ mYCyAaCHAJ5MGeroQWCReA98zCJP8wy0sgjHETF2nfh3enY489VcOW7SRLaMHJLk9fRo 8ALg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MwjB1pYo; 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-39583-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39583-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 h4-20020a37c444000000b007832c2e6545si466826qkm.615.2024.01.25.20.00.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 20:00:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39583-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=MwjB1pYo; 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-39583-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39583-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 3FC091C2401D for ; Fri, 26 Jan 2024 04:00:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB79411731; Fri, 26 Jan 2024 03:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MwjB1pYo" Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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 2D4C3D29B; Fri, 26 Jan 2024 03:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706241564; cv=none; b=HAWXlMmP6dv0lmMHs7tpZNvkQjxH6R8LAPdgETwSzy2qrqxkeRF3eYcymti+xQXumoGsMvJZqqmGbln7xYWevsWFvc7p9UVGu8I8HlhDfhpkp5CgE532jddmcewseMR62Izytwv206c8DsutE1DrwnntnO9D2/zwjyh2YNKXL8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706241564; c=relaxed/simple; bh=FNWtIgM9IxJJ/n1X7p2clj7JyxfCP6T+ugF4coDERKU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bxLN2IoAqPsjhQi876TqoWKydPvUsMFLax2chvDZiTAXXWrJEaqH9qguqmVaS/hjg0T0RKA677n/Nn/YG2uY3XKk9aFjnJGJiXUOPQcDCPte4sbMTqNqHuwseQ54pmpgnDrtLJRlEuuDaPV8+THBIPm+EY2eAJqiycJFCuNW0RQ= 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=MwjB1pYo; arc=none smtp.client-ip=209.85.160.179 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-qt1-f179.google.com with SMTP id d75a77b69052e-4298b23abffso1711511cf.0; Thu, 25 Jan 2024 19:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706241556; x=1706846356; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=Ec+oZMGt7I/sXDo2HDWfHkpmX9raXfcV0tRYDCJOyxY=; b=MwjB1pYod4O4utrPNBGSbWwbRB3So9ck4iszaKQx1UFG/KLFV/uQWD2Pk8pMxIyqbS CkSrKJIzQZ9HrMpIUNHNRUsrq21m5DaPJEexSKSEut3ixRlr/bjz+dNKKyy/1jE0w3vM tTQHfbZqy5dE6muGEbHgzf2R8PMCm5DyeuxQU1e1tHHjEvvIo7w6vx9cB+Yi1Mzck/Md 3athfiWcZI7wKtPe80/XktIlu2xwO9iRk5pXGF6FpibWVshINAfRKfzCJTHT7hlC1Xk7 kJhHllfY2vOKx4jSy7VbL7JZ+mQ0OBApDVMCbxlBsa8Ht2cDMg2QrT0KkteVDZPI0XYd o4Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706241556; x=1706846356; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ec+oZMGt7I/sXDo2HDWfHkpmX9raXfcV0tRYDCJOyxY=; b=thOjcD4efJmaGOOKt81iOCD7RcS0kOFq3QENRiQTVgersH5xRkay4Oj6Q08xVac6LP J3Fm8VlY/1rF3wREMqzFU/FBH3sbKO6DG8v5fezu/Qt2fpZDtFiR/4XjausgJDJdZtJ5 927DhYqVULoKiozlbIzvPl+Do+Z/MbtYSRUs8Nx+UWfYGk9c+fUA/Q8smlv//fuNYDQV y0ecs1tAEoly6IIbKMeHTq4dUbZh1bdZypw1rPpJgYpRg7RdeDEldmSHT6afUoxYzi9J 3ck8nxn3Lrmds0a2UJlucSd+i5+2Zz+ct1zLP+VGBe6ajR8m0c4ZailfNWgLYZqRKGwd srgg== X-Gm-Message-State: AOJu0YxVKn9L6G+JeeHiOK/1WWA0KglVEL4flXj5xyz3mZvvU3QMAAPI 44got8cAFWDtR9Q+p6icxjxQ6moYP384dbQTznQvv05JuWPk4KpH X-Received: by 2002:a05:622a:5d97:b0:42a:751e:c2c2 with SMTP id fu23-20020a05622a5d9700b0042a751ec2c2mr473591qtb.40.1706241555874; Thu, 25 Jan 2024 19:59:15 -0800 (PST) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id cq11-20020a05622a424b00b0042a109265d5sm152988qtb.20.2024.01.25.19.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 19:59:15 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 2E7F727C005B; Thu, 25 Jan 2024 22:59:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 25 Jan 2024 22:59:15 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeliedgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Jan 2024 22:59:14 -0500 (EST) From: Boqun Feng To: linux-kernel@vger.kernel.org, rcu@vger.kernel.org, linux-doc@vger.kernel.org Cc: Jonathan Corbet , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang Subject: [PATCH 3/8] doc: Make checklist.rst note that spinlocks are implied RCU readers Date: Thu, 25 Jan 2024 19:58:06 -0800 Message-ID: <20240126035816.3129296-4-boqun.feng@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240126035816.3129296-1-boqun.feng@gmail.com> References: <20240126035816.3129296-1-boqun.feng@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" In kernels built with CONFIG_PREEMPT_RT=n, spinlock critical sections are RCU readers because they disable preemption. However, they are also RCU readers in CONFIG_PREEMPT_RT=y because in that case the locking primitives contain rcu_read_lock() and rcu_read_unlock(). Therefore, upgrade checklist.rst to document this non-obvious case. While in the area, fix a typo by changing "read-side critical" to "read-side critical section". Signed-off-by: Paul E. McKenney --- Documentation/RCU/checklist.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/RCU/checklist.rst b/Documentation/RCU/checklist.rst index 2d42998a89a6..98a622f77248 100644 --- a/Documentation/RCU/checklist.rst +++ b/Documentation/RCU/checklist.rst @@ -68,7 +68,8 @@ over a rather long period of time, but improvements are always welcome! rcu_read_lock_sched(), or by the appropriate update-side lock. Explicit disabling of preemption (preempt_disable(), for example) can serve as rcu_read_lock_sched(), but is less readable and - prevents lockdep from detecting locking issues. + prevents lockdep from detecting locking issues. Acquiring a + spinlock also enters an RCU read-side critical section. Please note that you *cannot* rely on code known to be built only in non-preemptible kernels. Such code can and will break, @@ -444,7 +445,7 @@ over a rather long period of time, but improvements are always welcome! real-time workloads than is synchronize_rcu_expedited(). It is also permissible to sleep in RCU Tasks Trace read-side - critical, which are delimited by rcu_read_lock_trace() and + critical section, which are delimited by rcu_read_lock_trace() and rcu_read_unlock_trace(). However, this is a specialized flavor of RCU, and you should not use it without first checking with its current users. In most cases, you should instead use SRCU. -- 2.43.0