Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1133131ybx; Tue, 5 Nov 2019 10:54:44 -0800 (PST) X-Google-Smtp-Source: APXvYqz8lBYl3db7QdeZKswcJZLb3dMc6o5WXS6cNu8I2dY39fm7H1QPdOqT3JuL2XIe8Zx79xmX X-Received: by 2002:a17:906:245b:: with SMTP id a27mr31404348ejb.192.1572980084389; Tue, 05 Nov 2019 10:54:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572980084; cv=none; d=google.com; s=arc-20160816; b=ZCUkg0v9bFUfgp6vI/rmdYS7EuwVt1J9i4YNY9w7FKjE1CZwarXHOOeja2fSS/IglT Dprx1X08EQEm8qtIGM9GC6g7drm3bZiQTqvJWoAHYXb0EZVR80N582ssfCnWPGcDJUDL Blcc8kGU/Ro+cY1TJCHiR8K08Z18ggwzUmhTbqmhdZ9UziBra9gBPUPpx6Gff8nhrMCj YfKnC+5U05hZZrVSCffz8gM78pvxJyxtm3UUClmPrQj836UCw9qPTcO+tA6J+E7+MTHB LvyrerninnhwE/6UpcnbyeKSOeAV8dZ15uPh6LisIzBSh6s2EYPjJ7+o2/rZJBMJlaW3 ihWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lcBaUECIV9z6RejdYiQ5mOojMFMvm3rPEw7OA6L0b/0=; b=JAfgwfl2xDTM1VGE+isKJH2+IvbRZQWNpiuWvfvvTyfpFg1wBnUocJ6z5ple3X1x9z q451CDsLq4V9ihIE1/cHx9qHKAoMVU2AQfDKe7g0m6aqZzXZxfEKyLoGnpUEc9eNcyuD QSkAWrQmqA/ThgXlIF73qyqAM9Xw6P5nIcY4N2oh15U29OqkZfMn7azbGphbkh0Yeilm cxDWPAfM9GTXV42/sKQ4Bmxkc/pK5YeBLWWJDDisILy6lkiBdGLv//AtnPjMPTotvPx3 RWTuE6ihba4MqG4SJHYg+OJsrAYjWV6zBC8In85alceyjUiOycjpI4GI+DNRAnp+KXk0 k1TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n2j3Iqt4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ov6si10199646ejb.196.2019.11.05.10.54.20; Tue, 05 Nov 2019 10:54:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n2j3Iqt4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390827AbfKESvh (ORCPT + 99 others); Tue, 5 Nov 2019 13:51:37 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39314 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389724AbfKESvh (ORCPT ); Tue, 5 Nov 2019 13:51:37 -0500 Received: by mail-pg1-f195.google.com with SMTP id 29so3614188pgm.6; Tue, 05 Nov 2019 10:51:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lcBaUECIV9z6RejdYiQ5mOojMFMvm3rPEw7OA6L0b/0=; b=n2j3Iqt40E/JIYbIDE2YTTfCVK0fNvKdOzk/8SN1XThHY0rtuUi+Qjk8n4reLJ9p2h 9XQHeKAHCMAb7Fn28mfwp6/JzhzHlohoASYtxrVjpylvNCvTYe2cUAiOcAa2+hZTqKau mzoiKvtAOmtmQOsfbiVV1lJ/dh64qQ0WhnvoSmZOFgsT1Bbg/DXRV0+MOR41OsvajyqA yJLaI/QtaaW2is2zFzQE1N7umX72zI3jp4MC0tWRDeoCjXg2WQQpYvAzLva1aYB8X0Sq sDMq9+c8bk7C/9mVbwxDl8SaiWK/v7E52drJhL5E7kBVl0QwbrKseze7VPYmofW5qW62 +L5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lcBaUECIV9z6RejdYiQ5mOojMFMvm3rPEw7OA6L0b/0=; b=KKDyVkXB1cdnk230af1gPrkUfKHWhSoputAq6qKxTrB3OcCpLFMfxlpCzGBP8KPnGV q7zrsjlH2SapBaN7bpyJBcPLAuALT+l4MMk0MvJSujul/+4xKxRVuP0KAjHZ7yU5QkiH ZpJvuuw5QfxrZM+ZRKdDiENgJneTkNb8a/n9NOz0prwGDg67Nms9ScEPMk0SdQpHVJIM laeSyUxxYAvj3qC6j7Zy8hc5OxxGw9lD/zofL7TLZNORJ3i7r61R/BOBFrY8P4yioBPB l3MHNY2VBPCvqqk4GdIShkNOwY9TMR/9TaysImqENgqLGp42XOtIsJOfMgl8n2pcrfil XODA== X-Gm-Message-State: APjAAAXgE4xIe+dihUstvQV3Mov0jPLgb+nK6M1Jg/pwn8EbBfW3c9q3 wBgWiahfeePSDdE3Qht4a4Y= X-Received: by 2002:aa7:9156:: with SMTP id 22mr39719992pfi.246.1572979896117; Tue, 05 Nov 2019 10:51:36 -0800 (PST) Received: from workstation ([2405:204:1388:f954:e471:b4bc:a8c7:e586]) by smtp.gmail.com with ESMTPSA id w8sm12546619pfi.60.2019.11.05.10.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2019 10:51:35 -0800 (PST) Date: Wed, 6 Nov 2019 00:21:25 +0530 From: Amol Grover To: "Paul E. McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Jonathan Corbet Cc: rcu@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , Jani Nikula , Phong Tran , Madhuparna Bhowmik Subject: Re: [PATCH v2] Documentation: RCU: whatisRCU: Fix formatting for section 2 Message-ID: <20191105185125.GA13672@workstation> References: <20191105073340.GA3682@workstation-kernel-dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191105073340.GA3682@workstation-kernel-dev> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 05, 2019 at 01:03:40PM +0530, Amol Grover wrote: > Convert RCU API methods text to sub-headings and > add footnote linking to 2 literary notes > under rcu_dereference() section for improved UX > > Signed-off-by: Amol Grover > --- > Documentation/RCU/whatisRCU.rst | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/Documentation/RCU/whatisRCU.rst b/Documentation/RCU/whatisRCU.rst > index ae40c8bcc56c..4c6f1f595757 100644 > --- a/Documentation/RCU/whatisRCU.rst > +++ b/Documentation/RCU/whatisRCU.rst > @@ -150,6 +150,7 @@ later. See the kernel docbook documentation for more info, or look directly > at the function header comments. > > rcu_read_lock() > +^^^^^^^^^^^^^^^ > > void rcu_read_lock(void); > > @@ -164,6 +165,7 @@ rcu_read_lock() > longer-term references to data structures. > > rcu_read_unlock() > +^^^^^^^^^^^^^^^^^ > > void rcu_read_unlock(void); > > @@ -172,6 +174,7 @@ rcu_read_unlock() > read-side critical sections may be nested and/or overlapping. > > synchronize_rcu() > +^^^^^^^^^^^^^^^^^ > > void synchronize_rcu(void); > > @@ -225,6 +228,7 @@ synchronize_rcu() > checklist.txt for some approaches to limiting the update rate. > > rcu_assign_pointer() > +^^^^^^^^^^^^^^^^^^^^ > > void rcu_assign_pointer(p, typeof(p) v); > > @@ -245,6 +249,7 @@ rcu_assign_pointer() > the _rcu list-manipulation primitives such as list_add_rcu(). > > rcu_dereference() > +^^^^^^^^^^^^^^^^^ > > typeof(p) rcu_dereference(p); > > @@ -280,7 +285,7 @@ rcu_dereference() > unnecessary overhead on Alpha CPUs. > > Note that the value returned by rcu_dereference() is valid > - only within the enclosing RCU read-side critical section [1]. > + only within the enclosing RCU read-side critical section [1]_. > For example, the following is -not- legal:: > > rcu_read_lock(); > @@ -304,9 +309,9 @@ rcu_dereference() > at any time, including immediately after the rcu_dereference(). > And, again like rcu_assign_pointer(), rcu_dereference() is > typically used indirectly, via the _rcu list-manipulation > - primitives, such as list_for_each_entry_rcu() [2]. > + primitives, such as list_for_each_entry_rcu() [2]_. > > - [1] The variant rcu_dereference_protected() can be used outside > +.. [1] The variant rcu_dereference_protected() can be used outside > of an RCU read-side critical section as long as the usage is > protected by locks acquired by the update-side code. This variant > avoids the lockdep warning that would happen when using (for > @@ -319,7 +324,8 @@ rcu_dereference() > a lockdep splat is emitted. See Documentation/RCU/Design/Requirements/Requirements.rst > and the API's code comments for more details and example usage. > > - [2] If the list_for_each_entry_rcu() instance might be used by > + > +.. [2] If the list_for_each_entry_rcu() instance might be used by > update-side code as well as by RCU readers, then an additional > lockdep expression can be added to its list of arguments. > For example, given an additional "lock_is_held(&mylock)" argument, > -- > 2.20.1 > Please ignore this patch. Thanks Amol