<div dir="ltr">Thank you Amol and Phong for your valuable feedback. I have made the changes requested and sent the patch.<div><br></div><div><a href="https://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/2019-November/001055.html" target="_blank">https://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/2019-November/001055.html</a><br></div><div><br></div><div>Regards,</div><div>Madhuparna</div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=abWFkaHVwYXJuYWJob3dtaWswNEBnbWFpbC5jb20%3D&type=zerocontent&guid=9c13d0fb-d0cd-4e01-9df0-988426ad16bd"><font color="#ffffff" size="1">ᐧ</font></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 5, 2019 at 8:15 PM Paul E. McKenney <<a href="mailto:paulmck@kernel.org">paulmck@kernel.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Nov 05, 2019 at 08:03:44PM +0530, Amol Grover wrote:<br>
> On Tue, Nov 05, 2019 at 06:04:11AM -0800, Paul E. McKenney wrote:<br>
> > On Tue, Nov 05, 2019 at 08:49:47PM +0700, Phong Tran wrote:<br>
> > > On 10/29/19 3:24 AM, <a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a> wrote:<br>
> > > > From: Madhuparna Bhowmik <<a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a>><br>
> > > > <br>
> > > > This patch converts arrayRCU from txt to rst format.<br>
> > > > arrayRCU.rst is also added in the index.rst file.<br>
> > > > <br>
> > > > Signed-off-by: Madhuparna Bhowmik <<a href="mailto:madhuparnabhowmik04@gmail.com" target="_blank">madhuparnabhowmik04@gmail.com</a>><br>
> > > > ---<br>
> > > > .../RCU/{arrayRCU.txt => arrayRCU.rst} | 18 +++++++++++++-----<br>
> > > > Documentation/RCU/index.rst | 1 +<br>
> > > > 2 files changed, 14 insertions(+), 5 deletions(-)<br>
> > > > rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)<br>
> > > > <br>
> > > > diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst<br>
> > > > similarity index 91%<br>
> > > > rename from Documentation/RCU/arrayRCU.txt<br>
> > > > rename to Documentation/RCU/arrayRCU.rst<br>
> > > > index f05a9afb2c39..ed5ae24b196e 100644<br>
> > > > --- a/Documentation/RCU/arrayRCU.txt<br>
> > > > +++ b/Documentation/RCU/arrayRCU.rst<br>
> > > > @@ -1,5 +1,7 @@<br>
> > > > -Using RCU to Protect Read-Mostly Arrays<br>
> > > > +.. _array_rcu_doc:<br>
> > > > +Using RCU to Protect Read-Mostly Arrays<br>
> > > > +=======================================<br>
> > > > Although RCU is more commonly used to protect linked lists, it can<br>
> > > > also be used to protect arrays. Three situations are as follows:<br>
> > > > @@ -26,6 +28,7 @@ described in the following sections.<br>
> > > <br>
> > > It will be better to have the cross reference for each situation.<br>
> > > <br>
> > > Hash Tables<br>
> > > Static Arrays<br>
> > > Resizeable Arrays<br>
> > <br>
> > Madhuparna, could you please put a patch together creating these<br>
> > cross-references and handling Phong's comments below (probably<br>
> > by getting rid of the "." so that the resulting ":" doesn't look<br>
> > strange)?<br>
> > <br>
> > Then I will fold that patch into your original commit in -rcu and<br>
> > add Phong's Tested-by.<br>
> > <br>
> > Thanx, Paul<br>
> > <br>
> > > > Situation 1: Hash Tables<br>
> > > > +------------------------<br>
> > > > Hash tables are often implemented as an array, where each array entry<br>
> > > > has a linked-list hash chain. Each hash chain can be protected by RCU<br>
> > > > @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.<br>
> > > > Situation 2: Static Arrays<br>
> > > > +--------------------------<br>
> > > > Static arrays, where the data (rather than a pointer to the data) is<br>
> > > > located in each array element, and where the array is never resized,<br>
> > > > @@ -41,11 +45,13 @@ have not been used with RCU. Rik van Riel recommends using seqlock in<br>
> > > > this situation, which would also have minimal read-side overhead as long<br>
> > > > as updates are rare.<br>
> > > > -Quick Quiz: Why is it so important that updates be rare when<br>
> > > > - using seqlock?<br>
> > > > +Quick Quiz:<br>
> > > > + Why is it so important that updates be rare when using seqlock?<br>
> > > > +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`<br>
> > > > Situation 3: Resizeable Arrays<br>
> > > > +------------------------------<br>
> > > > Use of RCU for resizeable arrays is demonstrated by the grow_ary()<br>
> > > > function formerly used by the System V IPC code. The array is used<br>
> > > > @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to<br>
> > > > the new array, and invokes ipc_rcu_putref() to free up the old array.<br>
> > > > Note that rcu_assign_pointer() is used to update the ids->entries pointer,<br>
> > > > which includes any memory barriers required on whatever architecture<br>
> > > > -you are running on.<br>
> > > > +you are running on.::<br>
> > > <br>
> > > a redundant ":" in here with html page.<br>
> > > <br>
> > > <br>
> > > <br>
> > > <br>
> > > > static int grow_ary(struct ipc_ids* ids, int newsize)<br>
> > > > {<br>
> > > > @@ -112,7 +118,7 @@ a simple check suffices. The pointer to the structure corresponding<br>
> > > > to the desired IPC object is placed in "out", with NULL indicating<br>
> > > > a non-existent entry. After acquiring "out->lock", the "out->deleted"<br>
> > > > flag indicates whether the IPC object is in the process of being<br>
> > > > -deleted, and, if not, the pointer is returned.<br>
> > > > +deleted, and, if not, the pointer is returned.::<br>
> > > <br>
> > > same as above<br>
> > > <br>
> > > <br>
> > > Tested-by: Phong Tran <<a href="mailto:tranmanphong@gmail.com" target="_blank">tranmanphong@gmail.com</a>><br>
> > > <br>
> > > Regards,<br>
> > > Phong.<br>
> > > <br>
> > > > struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)<br>
> > > > {<br>
> > > > @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.<br>
> > > > return out;<br>
> > > > }<br>
> > > > +.. _answer_quick_quiz_seqlock:<br>
> > > > Answer to Quick Quiz:<br>
> > > > + Why is it so important that updates be rare when using seqlock?<br>
> > > > The reason that it is important that updates be rare when<br>
> > > > using seqlock is that frequent updates can livelock readers.<br>
> > > > diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst<br>
> > > > index 5c99185710fa..8d20d44f8fd4 100644<br>
> > > > --- a/Documentation/RCU/index.rst<br>
> > > > +++ b/Documentation/RCU/index.rst<br>
> > > > @@ -7,6 +7,7 @@ RCU concepts<br>
> > > > .. toctree::<br>
> > > > :maxdepth: 3<br>
> > > > + arrayRCU<br>
> > > > rcu<br>
> > > > listRCU<br>
> > > > UP<br>
> > > > <br>
> > _______________________________________________<br>
> > Linux-kernel-mentees mailing list<br>
> > <a href="mailto:Linux-kernel-mentees@lists.linuxfoundation.org" target="_blank">Linux-kernel-mentees@lists.linuxfoundation.org</a><br>
> > <a href="https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees</a><br>
> <br>
> Hey,<br>
> There are a few instances in the document where words are<br>
> emphasized. Example, -not- in the first paragraph. The <br>
> previous emphasis was correct wrt txt format, but this<br>
> could be converted to italicize/bold to keep up with the<br>
> reST format. Other than this and what Phong suggested,<br>
> everything looks good!<br>
> <br>
> Tested-by: Amol Grover <<a href="mailto:frextrite@gmail.com" target="_blank">frextrite@gmail.com</a>><br>
<br>
Thank you, Amol!<br>
<br>
Madhuparna, could you please also include a fix to the "-not-"<br>
text-emphasis issue (and any other occurrences) that Amol located?<br>
<br>
I can then add both Phong's and Amol's Tested-by.<br>
<br>
Thanx, Paul<br>
</blockquote></div>