Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2114140rdb; Tue, 3 Oct 2023 10:33:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFONMvb3v3bjoo01ph7Df54erft/bMm5Z2B3/MXiTSTyR+0MCOi6McMqyJkyMpxBFxQwEcv X-Received: by 2002:a05:6a00:3906:b0:690:c75e:25d7 with SMTP id fh6-20020a056a00390600b00690c75e25d7mr250270pfb.18.1696354423585; Tue, 03 Oct 2023 10:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696354423; cv=none; d=google.com; s=arc-20160816; b=A7c+UvJgffMCmySVk3/RGeTT1aoSr6tCQvPtxgRPAusrlz9hFEvS0o6J2eSRwmpFTm Vz7SjqVhPgCov6vOOmf6vJQ6I+l99gVJiE+csWOd05VMWurp+1vAbiqy0TvwM5WR5jYf 4r35A3wkVY3CN0l/f1f3W5PV3Eqs6ffOoRuVGIYRyNmo3E46AOJSy2lW5FfKtPKp69rh iTzfLR1wJBWB8FkGIDxUkrmUTtC9ih0qKUZGMZqcnPGHyln7i+pwzH7uaZVV845e8XHO iacG4nYAkqMznpte4wPKYo4Yg+dyrDvtiSDY2pVTh4NYqDwOGI+YZawUksM55RZw6xfC 9HSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=CSLL/ljulKSDGMSMpJJo8DnPdV9c3yV2iQZ7soWU4Is=; fh=M0FdwxzQOlRlN37tS//bGEyDFTI04Xlr3o5hhLzahhQ=; b=zoRKPt691TCBvf/7fspFnJmbELDb6xi8fb7MR9bEQDRp5TlziTZkCJoX4aDdqoT7vQ tDERQQCbxZp2ix+yqUBZYl0eNWX+S3peGmP2QYebg9Uspfg8LvAYUSTXGUcbN9EHCs9B vqwgnO7F8j93Ih3bM0fiAEN72cg7RrkuHlnjy9gfkDBK1XeoW12EjFGmK4zAqRg2BPxJ xirv+Ma5/9b6T0qFquc89sx5LyyCFyOYNk/7/a7aArJrRYLvxqWqpr2lHeweON5HDcEl k01YC4QnFZYRQBZJhNT5pdvnX4w1rPlWBiajrlW8z6OjDS8f+D2gpEEG5NX/hBNwyapR 9wHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mZ7tRiqH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f20-20020a637554000000b005776040b2a6si1894651pgn.187.2023.10.03.10.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 10:33:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mZ7tRiqH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id E8E8782DFD02; Tue, 3 Oct 2023 10:33:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231892AbjJCRdi (ORCPT + 99 others); Tue, 3 Oct 2023 13:33:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230245AbjJCRdh (ORCPT ); Tue, 3 Oct 2023 13:33:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A71AFAC for ; Tue, 3 Oct 2023 10:33:34 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F5A6C433C7; Tue, 3 Oct 2023 17:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696354414; bh=rzlml4twXPG1yYnrvCDoBzosHm5mKs/NlXodh5FZlzE=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=mZ7tRiqHLm4DAf/mBnMc9s1/fADt+ai33WM5iWk8D0gFiyHfAwx+x8yjJkFHfCQRo SKj4h5P5fZ9Hl2iYplfWNA/QvZYUuJow6xe+XW1xi9vCjo0nP2sP8AZGFhzJgZ/AAX twidMdGNTwP8HwZHDx5gpkmQrrbiARndi5uIJZiOJIzZg8i/L58vVLcTtmb9xVAbE/ KQwm837497ZXJtiz3mJZkwXww00yJvztrel+Lbc210+0VlKKN0fY9fIJuj14XXcFHr N1viKd7SQ2bLIDmqhhF77onBmFoajPywZRSFInsXg07Gp0eiXyZKWRX2ezbO844UfF 86LtoYbkcpN4w== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id CEA1ACE1104; Tue, 3 Oct 2023 10:33:33 -0700 (PDT) Date: Tue, 3 Oct 2023 10:33:33 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Mathieu Desnoyers , linux-kernel@vger.kernel.org, Michael Jeanson , Peter Zijlstra , Alexei Starovoitov , Yonghong Song , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , bpf@vger.kernel.org, Joel Fernandes Subject: Re: [RFC PATCH v3 1/5] tracing: Introduce faultable tracepoints (v3) Message-ID: <99ec6025-c170-459c-8b43-58cf1a85f832@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20231002202531.3160-1-mathieu.desnoyers@efficios.com> <20231002202531.3160-2-mathieu.desnoyers@efficios.com> <20231002191023.6175294d@gandalf.local.home> <97c559c9-51cf-415c-8b0b-39eba47b8898@paulmck-laptop> <20231002211936.5948253e@gandalf.local.home> <5d0771e9-332c-42cd-acf3-53d46bb691f3@paulmck-laptop> <20231003100854.7285d2a9@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231003100854.7285d2a9@gandalf.local.home> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 10:33:41 -0700 (PDT) On Tue, Oct 03, 2023 at 10:08:54AM -0400, Steven Rostedt wrote: > On Tue, 3 Oct 2023 06:44:50 -0700 > "Paul E. McKenney" wrote: > > > > That way it is clear what uses what, as I read the original paragraph a > > > couple of times and could have sworn that rcu_read_lock_trace() required > > > tasks to not block. > > > > That would work for me. Would you like to send a patch, or would you > > rather we made the adjustments? > > Which ever. OK, how about like this? Thanx, Paul ------------------------------------------------------------------------ commit 973eb79ec46c16f13bb5b47ad14d44a1f1c79dc9 Author: Paul E. McKenney Date: Tue Oct 3 10:30:01 2023 -0700 doc: Clarify RCU Tasks reader/updater checklist Currently, the reader/updater compatibility rules for the three RCU Tasks flavors are squished together in a single paragraph, which can result in confusion. This commit therefore splits them out into a list, clearly showing the distinction between these flavors. Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney diff --git a/Documentation/RCU/checklist.rst b/Documentation/RCU/checklist.rst index bd3c58c44bef..c432899aff22 100644 --- a/Documentation/RCU/checklist.rst +++ b/Documentation/RCU/checklist.rst @@ -241,15 +241,22 @@ over a rather long period of time, but improvements are always welcome! srcu_struct. The rules for the expedited RCU grace-period-wait primitives are the same as for their non-expedited counterparts. - If the updater uses call_rcu_tasks() or synchronize_rcu_tasks(), - then the readers must refrain from executing voluntary - context switches, that is, from blocking. If the updater uses - call_rcu_tasks_trace() or synchronize_rcu_tasks_trace(), then - the corresponding readers must use rcu_read_lock_trace() and - rcu_read_unlock_trace(). If an updater uses call_rcu_tasks_rude() - or synchronize_rcu_tasks_rude(), then the corresponding readers - must use anything that disables preemption, for example, - preempt_disable() and preempt_enable(). + Similarly, it is necssary to correctly use the RCU Tasks flavors: + + a. If the updater uses synchronize_rcu_tasks() or + call_rcu_tasks(), then the readers must refrain from + executing voluntary context switches, that is, from + blocking. + + b. If the updater uses call_rcu_tasks_trace() + or synchronize_rcu_tasks_trace(), then the + corresponding readers must use rcu_read_lock_trace() + and rcu_read_unlock_trace(). + + c. If an updater uses call_rcu_tasks_rude() or + synchronize_rcu_tasks_rude(), then the corresponding + readers must use anything that disables preemption, + for example, preempt_disable() and preempt_enable(). Mixing things up will result in confusion and broken kernels, and has even resulted in an exploitable security issue. Therefore,