Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4795078rdb; Tue, 12 Dec 2023 09:27:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IE26m48mWq1MnQRNBbJ+05yFaPyTrx74lhCCC+MjVO8KEhPGRw4Hsvt8/m7Z01nc7+oDmYq X-Received: by 2002:a05:6e02:1a4d:b0:35d:a4a9:7bb7 with SMTP id u13-20020a056e021a4d00b0035da4a97bb7mr10066226ilv.63.1702402063228; Tue, 12 Dec 2023 09:27:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702402063; cv=none; d=google.com; s=arc-20160816; b=E3Q5pRM32e0A1BOa/qWLpGWhUqTlpuTk1QeRbeEVXjPEok66V5l9zsfKxXIn75cWgr DVYRTRLf1Jwz15d0yCwnxvS4S0NKLgPivpmBLmbhI4ezL47Wp6iF/zd9zZCtXCas9V5d PcwpPaZdbd70tqmRcTCzvGbBqLHH0AOCyIUoQEivDB2OQB2x8WQdMgoVBex+2aSS5I3d akYEqAi5s4jMYLq6H0DJbTJ6S8IFRwy6FKePxfbzeRcEnKzf0tKBZNFnufM6MqCP/Kqs nOF53ht45TVF7mhpMnvjGFaqUvkzqb1twXHYcKRP0JIJ4HD4tNh9WqkPanvRrxl6zmAj 1+rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oy94NtGvJMR2W5ZqUeOhkG8IQpCje9YrX1YzEkIZAAM=; fh=fXkDWEK4gnshzlaKNBZnqVilAhUz+xymUFipw52Z3X8=; b=EdX6xLECBXvPsOKFZthuLXVBBnNf3Rv5GcVpz+nR6FmF+YX3aUy4OGvbyXdBdXgPCb dbrBQTCbfGooCTpn8QYAaecUDI/t2Fl7v7jnH/TM39hIzjr9y0IeAbvId24JXQa4ufKB XDJiiMCpifLign30gXEOdafyHEiiqW6VRt/MuatuvQXxYKG8TXjXH5RWp1Wy1WkWOcms e8HKE1GuJDuftX0r0lPkXHTCYLhurNbp6Xy8k0qWXznZGm8lzoHZP8+on2aj1zdKsQWB 7G5QWuXFoLAGb3t2MutBETsOgWv/Kyq6MJ0kg8LSO0VIBVBMb2XxXE7tstb8nts3pW0J R4cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y0KyrIu2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o7-20020a63e347000000b005c6c950c3bdsi7948100pgj.642.2023.12.12.09.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 09:27:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y0KyrIu2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F19298090FA1; Tue, 12 Dec 2023 09:27:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376767AbjLLR1b (ORCPT + 99 others); Tue, 12 Dec 2023 12:27:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376771AbjLLR1a (ORCPT ); Tue, 12 Dec 2023 12:27:30 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 351779F; Tue, 12 Dec 2023 09:27:37 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1d0c94397c0so34705025ad.2; Tue, 12 Dec 2023 09:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702402056; x=1703006856; 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=oy94NtGvJMR2W5ZqUeOhkG8IQpCje9YrX1YzEkIZAAM=; b=Y0KyrIu26IiCXkXXXMv8JuE9bV146lAYbphRQWJPzj+Pukgp5a1w22HlOTpjWF4J4Z JA6HtNihTmyG1emfB6BkNiNN36MNnX1C0VY+I9l/rU5Ev1ZZ2cw+kQ418Bj4US5TcNRD Bvg2LPZ6SyIePc3qBI3lKN7X1zYZSumcP4zGexJUDM8fFPj0bs/3+VQ25dMAGOeq/ATG 0RqadBiUjFGLTX4ZkGGMFf9Y40JYaae/bgMoltkVKDd8xRW5H6jRhh0QG7dhMfJofZu/ i1C1f3r+Hi7dhHw4cOMLZENFMTzhthMKmyg0GgjN7SQfHpQO4n96Zlph2ZMRCH6AaCMb /JxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702402056; x=1703006856; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oy94NtGvJMR2W5ZqUeOhkG8IQpCje9YrX1YzEkIZAAM=; b=S2q0LiQj3J5g+Xdl9OYR0lsn9IOhMBbXAdsJNng+NDrMX/jcxemxQzr6oNx/7A+dVY iod0ozAJG6xh3ZD4N/0NiJ1OwLfoiwKXsBdQzsGYxwJ73C4P4aOLcQ3v7DQNsBWiGGh/ 2C8s14DS73Gbh92fjNy32gVnPt/H0MOIqnERKzuNPbpP0Fr/tLVxRtsjjjDfMYHDdvJg 088V1M0tzMsX3FhzMPi9NUSVmoHBCZhsu90uRdiTGFgyDBCkc+JDu+Ov7awb29J3Tj1w /w1vuQvwDx5isy4xI+Dr/GkUrEQFc8fi/EVKJHjzpMDZ4dmcojRlc8PREx5uqcg2/0HB kWTA== X-Gm-Message-State: AOJu0YygTsKzYc/P+r+2HvLayJGyEmY3JjKnuwdnMlXgDa0v01bpopNd i/sIpypGZmoaO2vTuK+Ypw6o3dbOyAtHgTuN X-Received: by 2002:a17:902:e789:b0:1d0:b8dc:ec90 with SMTP id cp9-20020a170902e78900b001d0b8dcec90mr3964074plb.64.1702402055592; Tue, 12 Dec 2023 09:27:35 -0800 (PST) Received: from localhost.localdomain ([101.0.63.152]) by smtp.gmail.com with ESMTPSA id b18-20020a170902d51200b001cf511aa772sm8863170plg.145.2023.12.12.09.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 09:27:35 -0800 (PST) From: "Neeraj Upadhyay (AMD)" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, paulmck@kernel.org, Neeraj.Upadhyay@amd.com, Mathieu Desnoyers , Neeraj Upadhyay Subject: [PATCH rcu 3/5] doc: Clarify RCU Tasks reader/updater checklist Date: Tue, 12 Dec 2023 22:56:51 +0530 Message-Id: <20231212172653.11485-3-neeraj.iitr10@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231212172343.GA11383@neeraj.linux> References: <20231212172343.GA11383@neeraj.linux> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 (snail.vger.email [0.0.0.0]); Tue, 12 Dec 2023 09:27:42 -0800 (PST) From: "Paul E. McKenney" 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) Signed-off-by: Neeraj Upadhyay (AMD) --- Documentation/RCU/checklist.rst | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) 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, -- 2.40.1