Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2136229rdb; Tue, 3 Oct 2023 11:15:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOnrUl4E/XXOJTuc+PCXvU2gAykXkgmz+uHkeilnimEHo9NOmU09pFMLoGQF+Q3LQXiG0a X-Received: by 2002:a17:90b:1b0e:b0:274:6839:6a89 with SMTP id nu14-20020a17090b1b0e00b0027468396a89mr109785pjb.27.1696356958881; Tue, 03 Oct 2023 11:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696356958; cv=none; d=google.com; s=arc-20160816; b=tzbaSVhSbaMg3oGfvcPZzbPLpEMGRgWuCJKT23HjtC9ZBesKXj9IJ8R3evTA5GpXlJ AqZTYKmYWcIx+xm0gUIiWcCr7cVYg8FsG+C7s/G8fbsmyg9uJ1p8uscBtSoe5KPTsrif 9bWF7Kjg++AqGHa7UJxWL3tbE33nynCphDs4/RDKRa3Frirvkok8hQqQnXBxqdkSUpdR rZniTGtX+mHC1IlfhOxVE1NZUQcTUAXBeK5FoKIMJqJ4c2nRssHPaf5PsvYYjjRPrqci uZ9ptnrZtdg19DvnzZaBegvMZqaPWFgxFQOLB6z+7+hRMPTsc5fGt4pz8Z3FUYf1gaVf MdRA== 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=tQ3bl7yuxixgT4obbqfacuQocGmJ4RSIoADn40Ey4AE=; fh=M0FdwxzQOlRlN37tS//bGEyDFTI04Xlr3o5hhLzahhQ=; b=bM5Remv8us0XneB1V7nCbRSIapy+hg35i32IOLvFMOvxT9w6h67smyjbSolbJvd42z 8AZRbdUSXWJRTa1HMA81TcosjQxBujiC89koP8n3wwo8bZdTuRI5NzzTWmVCuhB1kj3d RaImquJ1TzP4cEXt0ohXI34iC/U/Oa1KStQomRiaFwly0KHupr8Nkr7cI1ONWHBoG/ja oMSiKjoieOSo3sG3UQEPUaIOHoL07Lcg9WSINWpoHxmqtWonnujt+PVRI84BidmlrJ71 JmLPVcd9SKTsCtGw1/XmWo+TW0k0jrcSVbt/BABbgKfRB01Iku+XfdQVOvFUQgYTMFH6 Mr9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V+KQtg78; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id nv2-20020a17090b1b4200b0027767acebb4si735143pjb.1.2023.10.03.11.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 11:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V+KQtg78; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 6D7A580AC45E; Tue, 3 Oct 2023 11:15:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240754AbjJCSP0 (ORCPT + 99 others); Tue, 3 Oct 2023 14:15:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240726AbjJCSPZ (ORCPT ); Tue, 3 Oct 2023 14:15:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF76FAC for ; Tue, 3 Oct 2023 11:15:22 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C3F6C433C9; Tue, 3 Oct 2023 18:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696356922; bh=2ZuP7lJ7WtElDUZcFZxEyIv7MkbKbZj8sBIbqGclYEY=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=V+KQtg78vN0drOxU+LcSVPCPrMzHEMbJEGkFhWNnGVZV7bA9m0cRKiw0GhHgeI5SD X6mqhyNIQArcKFj6+2hWnOsFvXud97IGnvAS0BUPjVcLN479DgUYQ4UmxOvW53XOJt /YvH+gli0Wc7aCp7Ged1MSNst1F3YfDV+epj35vQIAx5gEeoFQKrHKIDL2gwbv2q6f GXtIDb/4xvqRoW6A7euoYaN/bpd14Spd0k4m9XOkEi7nvbBIRo+P7JMA6pZ5FBQqOv 2XRBOL85Y4dyaSGxTyWxexO+fL8MtFtMRTKPlry0BEMnHGTlIpkpo3vxmZ9sTe8p30 NWdmhbb1+UBTw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id D5884CE1104; Tue, 3 Oct 2023 11:15:21 -0700 (PDT) Date: Tue, 3 Oct 2023 11:15:21 -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: <2ba5baa2-3598-4499-bd88-b7fc139f6ad8@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> <99ec6025-c170-459c-8b43-58cf1a85f832@paulmck-laptop> <20231003133856.2879f36f@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231003133856.2879f36f@gandalf.local.home> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 11:15:39 -0700 (PDT) On Tue, Oct 03, 2023 at 01:38:56PM -0400, Steven Rostedt wrote: > On Tue, 3 Oct 2023 10:33:33 -0700 > "Paul E. McKenney" wrote: > > > 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? > > Reviewed-by: Steven Rostedt (Google) > > Link: https://lore.kernel.org/all/20231002211936.5948253e@gandalf.local.home/ Thank you both! Updated as shown below. Thanx, Paul ------------------------------------------------------------------------ commit 4d2115e8919760c690e30f48cae2f017c1581546 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. Link: https://lore.kernel.org/all/20231002211936.5948253e@gandalf.local.home/ Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney Reviewed-by: Mathieu Desnoyers Reviewed-by: Steven Rostedt (Google) 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,