linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
@ 2019-10-28 20:24 madhuparnabhowmik04
  2019-10-28 20:24 ` madhuparnabhowmik04
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: madhuparnabhowmik04 @ 2019-10-28 20:24 UTC (permalink / raw)


From: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>

This patch converts arrayRCU from txt to rst format.
arrayRCU.rst is also added in the index.rst file.

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
---
 .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
 Documentation/RCU/index.rst                    |  1 +
 2 files changed, 14 insertions(+), 5 deletions(-)
 rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)

diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst
similarity index 91%
rename from Documentation/RCU/arrayRCU.txt
rename to Documentation/RCU/arrayRCU.rst
index f05a9afb2c39..ed5ae24b196e 100644
--- a/Documentation/RCU/arrayRCU.txt
+++ b/Documentation/RCU/arrayRCU.rst
@@ -1,5 +1,7 @@
-Using RCU to Protect Read-Mostly Arrays
+.. _array_rcu_doc:
 
+Using RCU to Protect Read-Mostly Arrays
+=======================================
 
 Although RCU is more commonly used to protect linked lists, it can
 also be used to protect arrays.  Three situations are as follows:
@@ -26,6 +28,7 @@ described in the following sections.
 
 
 Situation 1: Hash Tables
+------------------------
 
 Hash tables are often implemented as an array, where each array entry
 has a linked-list hash chain.  Each hash chain can be protected by RCU
@@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
 
 
 Situation 2: Static Arrays
+--------------------------
 
 Static arrays, where the data (rather than a pointer to the data) is
 located in each array element, and where the array is never resized,
@@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel recommends using seqlock in
 this situation, which would also have minimal read-side overhead as long
 as updates are rare.
 
-Quick Quiz:  Why is it so important that updates be rare when
-	     using seqlock?
+Quick Quiz:  
+		Why is it so important that updates be rare when using seqlock?
 
+:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
 
 Situation 3: Resizeable Arrays
+------------------------------
 
 Use of RCU for resizeable arrays is demonstrated by the grow_ary()
 function formerly used by the System V IPC code.  The array is used
@@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to
 the new array, and invokes ipc_rcu_putref() to free up the old array.
 Note that rcu_assign_pointer() is used to update the ids->entries pointer,
 which includes any memory barriers required on whatever architecture
-you are running on.
+you are running on.::
 
 	static int grow_ary(struct ipc_ids* ids, int newsize)
 	{
@@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the structure corresponding
 to the desired IPC object is placed in "out", with NULL indicating
 a non-existent entry.  After acquiring "out->lock", the "out->deleted"
 flag indicates whether the IPC object is in the process of being
-deleted, and, if not, the pointer is returned.
+deleted, and, if not, the pointer is returned.::
 
 	struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
 	{
@@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
 		return out;
 	}
 
+.. _answer_quick_quiz_seqlock:
 
 Answer to Quick Quiz:
+	Why is it so important that updates be rare when using seqlock?
 
 	The reason that it is important that updates be rare when
 	using seqlock is that frequent updates can livelock readers.
diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
index 5c99185710fa..8d20d44f8fd4 100644
--- a/Documentation/RCU/index.rst
+++ b/Documentation/RCU/index.rst
@@ -7,6 +7,7 @@ RCU concepts
 .. toctree::
    :maxdepth: 3
 
+   arrayRCU
    rcu
    listRCU
    UP
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-10-28 20:24 [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst madhuparnabhowmik04
@ 2019-10-28 20:24 ` madhuparnabhowmik04
  2019-10-28 21:00 ` paulmck
  2019-11-05 13:49 ` Phong Tran
  2 siblings, 0 replies; 11+ messages in thread
From: madhuparnabhowmik04 @ 2019-10-28 20:24 UTC (permalink / raw)


From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>

This patch converts arrayRCU from txt to rst format.
arrayRCU.rst is also added in the index.rst file.

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
---
 .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
 Documentation/RCU/index.rst                    |  1 +
 2 files changed, 14 insertions(+), 5 deletions(-)
 rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)

diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst
similarity index 91%
rename from Documentation/RCU/arrayRCU.txt
rename to Documentation/RCU/arrayRCU.rst
index f05a9afb2c39..ed5ae24b196e 100644
--- a/Documentation/RCU/arrayRCU.txt
+++ b/Documentation/RCU/arrayRCU.rst
@@ -1,5 +1,7 @@
-Using RCU to Protect Read-Mostly Arrays
+.. _array_rcu_doc:
 
+Using RCU to Protect Read-Mostly Arrays
+=======================================
 
 Although RCU is more commonly used to protect linked lists, it can
 also be used to protect arrays.  Three situations are as follows:
@@ -26,6 +28,7 @@ described in the following sections.
 
 
 Situation 1: Hash Tables
+------------------------
 
 Hash tables are often implemented as an array, where each array entry
 has a linked-list hash chain.  Each hash chain can be protected by RCU
@@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
 
 
 Situation 2: Static Arrays
+--------------------------
 
 Static arrays, where the data (rather than a pointer to the data) is
 located in each array element, and where the array is never resized,
@@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel recommends using seqlock in
 this situation, which would also have minimal read-side overhead as long
 as updates are rare.
 
-Quick Quiz:  Why is it so important that updates be rare when
-	     using seqlock?
+Quick Quiz:  
+		Why is it so important that updates be rare when using seqlock?
 
+:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
 
 Situation 3: Resizeable Arrays
+------------------------------
 
 Use of RCU for resizeable arrays is demonstrated by the grow_ary()
 function formerly used by the System V IPC code.  The array is used
@@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to
 the new array, and invokes ipc_rcu_putref() to free up the old array.
 Note that rcu_assign_pointer() is used to update the ids->entries pointer,
 which includes any memory barriers required on whatever architecture
-you are running on.
+you are running on.::
 
 	static int grow_ary(struct ipc_ids* ids, int newsize)
 	{
@@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the structure corresponding
 to the desired IPC object is placed in "out", with NULL indicating
 a non-existent entry.  After acquiring "out->lock", the "out->deleted"
 flag indicates whether the IPC object is in the process of being
-deleted, and, if not, the pointer is returned.
+deleted, and, if not, the pointer is returned.::
 
 	struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
 	{
@@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
 		return out;
 	}
 
+.. _answer_quick_quiz_seqlock:
 
 Answer to Quick Quiz:
+	Why is it so important that updates be rare when using seqlock?
 
 	The reason that it is important that updates be rare when
 	using seqlock is that frequent updates can livelock readers.
diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
index 5c99185710fa..8d20d44f8fd4 100644
--- a/Documentation/RCU/index.rst
+++ b/Documentation/RCU/index.rst
@@ -7,6 +7,7 @@ RCU concepts
 .. toctree::
    :maxdepth: 3
 
+   arrayRCU
    rcu
    listRCU
    UP
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-10-28 20:24 [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst madhuparnabhowmik04
  2019-10-28 20:24 ` madhuparnabhowmik04
@ 2019-10-28 21:00 ` paulmck
  2019-10-28 21:00   ` Paul E. McKenney
  2019-10-28 21:06   ` madhuparnabhowmik04
  2019-11-05 13:49 ` Phong Tran
  2 siblings, 2 replies; 11+ messages in thread
From: paulmck @ 2019-10-28 21:00 UTC (permalink / raw)


On Tue, Oct 29, 2019 at 01:54:17AM +0530, madhuparnabhowmik04 at gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
> 
> This patch converts arrayRCU from txt to rst format.
> arrayRCU.rst is also added in the index.rst file.
> 
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>

Much better, thank you!

I queued this with a small but important change called out below.

> ---
>  .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
>  Documentation/RCU/index.rst                    |  1 +
>  2 files changed, 14 insertions(+), 5 deletions(-)
>  rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)
> 
> diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst
> similarity index 91%
> rename from Documentation/RCU/arrayRCU.txt
> rename to Documentation/RCU/arrayRCU.rst
> index f05a9afb2c39..ed5ae24b196e 100644
> --- a/Documentation/RCU/arrayRCU.txt
> +++ b/Documentation/RCU/arrayRCU.rst
> @@ -1,5 +1,7 @@
> -Using RCU to Protect Read-Mostly Arrays
> +.. _array_rcu_doc:
>  
> +Using RCU to Protect Read-Mostly Arrays
> +=======================================
>  
>  Although RCU is more commonly used to protect linked lists, it can
>  also be used to protect arrays.  Three situations are as follows:
> @@ -26,6 +28,7 @@ described in the following sections.
>  
>  
>  Situation 1: Hash Tables
> +------------------------
>  
>  Hash tables are often implemented as an array, where each array entry
>  has a linked-list hash chain.  Each hash chain can be protected by RCU
> @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
>  
>  
>  Situation 2: Static Arrays
> +--------------------------
>  
>  Static arrays, where the data (rather than a pointer to the data) is
>  located in each array element, and where the array is never resized,
> @@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel recommends using seqlock in
>  this situation, which would also have minimal read-side overhead as long
>  as updates are rare.
>  
> -Quick Quiz:  Why is it so important that updates be rare when
> -	     using seqlock?
> +Quick Quiz:  

The above line added trailing whitespace.  I removed it for you, but
please check for this on future submissions.  ;-)

							Thanx, Paul

> +		Why is it so important that updates be rare when using seqlock?
>  
> +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
>  
>  Situation 3: Resizeable Arrays
> +------------------------------
>  
>  Use of RCU for resizeable arrays is demonstrated by the grow_ary()
>  function formerly used by the System V IPC code.  The array is used
> @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to
>  the new array, and invokes ipc_rcu_putref() to free up the old array.
>  Note that rcu_assign_pointer() is used to update the ids->entries pointer,
>  which includes any memory barriers required on whatever architecture
> -you are running on.
> +you are running on.::
>  
>  	static int grow_ary(struct ipc_ids* ids, int newsize)
>  	{
> @@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the structure corresponding
>  to the desired IPC object is placed in "out", with NULL indicating
>  a non-existent entry.  After acquiring "out->lock", the "out->deleted"
>  flag indicates whether the IPC object is in the process of being
> -deleted, and, if not, the pointer is returned.
> +deleted, and, if not, the pointer is returned.::
>  
>  	struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
>  	{
> @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
>  		return out;
>  	}
>  
> +.. _answer_quick_quiz_seqlock:
>  
>  Answer to Quick Quiz:
> +	Why is it so important that updates be rare when using seqlock?
>  
>  	The reason that it is important that updates be rare when
>  	using seqlock is that frequent updates can livelock readers.
> diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> index 5c99185710fa..8d20d44f8fd4 100644
> --- a/Documentation/RCU/index.rst
> +++ b/Documentation/RCU/index.rst
> @@ -7,6 +7,7 @@ RCU concepts
>  .. toctree::
>     :maxdepth: 3
>  
> +   arrayRCU
>     rcu
>     listRCU
>     UP
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-10-28 21:00 ` paulmck
@ 2019-10-28 21:00   ` Paul E. McKenney
  2019-10-28 21:06   ` madhuparnabhowmik04
  1 sibling, 0 replies; 11+ messages in thread
From: Paul E. McKenney @ 2019-10-28 21:00 UTC (permalink / raw)


On Tue, Oct 29, 2019 at 01:54:17AM +0530, madhuparnabhowmik04 at gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
> 
> This patch converts arrayRCU from txt to rst format.
> arrayRCU.rst is also added in the index.rst file.
> 
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>

Much better, thank you!

I queued this with a small but important change called out below.

> ---
>  .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
>  Documentation/RCU/index.rst                    |  1 +
>  2 files changed, 14 insertions(+), 5 deletions(-)
>  rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)
> 
> diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst
> similarity index 91%
> rename from Documentation/RCU/arrayRCU.txt
> rename to Documentation/RCU/arrayRCU.rst
> index f05a9afb2c39..ed5ae24b196e 100644
> --- a/Documentation/RCU/arrayRCU.txt
> +++ b/Documentation/RCU/arrayRCU.rst
> @@ -1,5 +1,7 @@
> -Using RCU to Protect Read-Mostly Arrays
> +.. _array_rcu_doc:
>  
> +Using RCU to Protect Read-Mostly Arrays
> +=======================================
>  
>  Although RCU is more commonly used to protect linked lists, it can
>  also be used to protect arrays.  Three situations are as follows:
> @@ -26,6 +28,7 @@ described in the following sections.
>  
>  
>  Situation 1: Hash Tables
> +------------------------
>  
>  Hash tables are often implemented as an array, where each array entry
>  has a linked-list hash chain.  Each hash chain can be protected by RCU
> @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
>  
>  
>  Situation 2: Static Arrays
> +--------------------------
>  
>  Static arrays, where the data (rather than a pointer to the data) is
>  located in each array element, and where the array is never resized,
> @@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel recommends using seqlock in
>  this situation, which would also have minimal read-side overhead as long
>  as updates are rare.
>  
> -Quick Quiz:  Why is it so important that updates be rare when
> -	     using seqlock?
> +Quick Quiz:  

The above line added trailing whitespace.  I removed it for you, but
please check for this on future submissions.  ;-)

							Thanx, Paul

> +		Why is it so important that updates be rare when using seqlock?
>  
> +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
>  
>  Situation 3: Resizeable Arrays
> +------------------------------
>  
>  Use of RCU for resizeable arrays is demonstrated by the grow_ary()
>  function formerly used by the System V IPC code.  The array is used
> @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to
>  the new array, and invokes ipc_rcu_putref() to free up the old array.
>  Note that rcu_assign_pointer() is used to update the ids->entries pointer,
>  which includes any memory barriers required on whatever architecture
> -you are running on.
> +you are running on.::
>  
>  	static int grow_ary(struct ipc_ids* ids, int newsize)
>  	{
> @@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the structure corresponding
>  to the desired IPC object is placed in "out", with NULL indicating
>  a non-existent entry.  After acquiring "out->lock", the "out->deleted"
>  flag indicates whether the IPC object is in the process of being
> -deleted, and, if not, the pointer is returned.
> +deleted, and, if not, the pointer is returned.::
>  
>  	struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
>  	{
> @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
>  		return out;
>  	}
>  
> +.. _answer_quick_quiz_seqlock:
>  
>  Answer to Quick Quiz:
> +	Why is it so important that updates be rare when using seqlock?
>  
>  	The reason that it is important that updates be rare when
>  	using seqlock is that frequent updates can livelock readers.
> diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> index 5c99185710fa..8d20d44f8fd4 100644
> --- a/Documentation/RCU/index.rst
> +++ b/Documentation/RCU/index.rst
> @@ -7,6 +7,7 @@ RCU concepts
>  .. toctree::
>     :maxdepth: 3
>  
> +   arrayRCU
>     rcu
>     listRCU
>     UP
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-10-28 21:00 ` paulmck
  2019-10-28 21:00   ` Paul E. McKenney
@ 2019-10-28 21:06   ` madhuparnabhowmik04
  2019-10-28 21:06     ` Madhuparna Bhowmik
  1 sibling, 1 reply; 11+ messages in thread
From: madhuparnabhowmik04 @ 2019-10-28 21:06 UTC (permalink / raw)


On Tue, Oct 29, 2019 at 2:30 AM Paul E. McKenney <paulmck at kernel.org> wrote:

> On Tue, Oct 29, 2019 at 01:54:17AM +0530, madhuparnabhowmik04 at gmail.com
> wrote:
> > From: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
> >
> > This patch converts arrayRCU from txt to rst format.
> > arrayRCU.rst is also added in the index.rst file.
> >
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
>
> Much better, thank you!
>
> I queued this with a small but important change called out below.
>
Thank you!

>
> > ---
> >  .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
> >  Documentation/RCU/index.rst                    |  1 +
> >  2 files changed, 14 insertions(+), 5 deletions(-)
> >  rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)
> >
> > diff --git a/Documentation/RCU/arrayRCU.txt
> b/Documentation/RCU/arrayRCU.rst
> > similarity index 91%
> > rename from Documentation/RCU/arrayRCU.txt
> > rename to Documentation/RCU/arrayRCU.rst
> > index f05a9afb2c39..ed5ae24b196e 100644
> > --- a/Documentation/RCU/arrayRCU.txt
> > +++ b/Documentation/RCU/arrayRCU.rst
> > @@ -1,5 +1,7 @@
> > -Using RCU to Protect Read-Mostly Arrays
> > +.. _array_rcu_doc:
> >
> > +Using RCU to Protect Read-Mostly Arrays
> > +=======================================
> >
> >  Although RCU is more commonly used to protect linked lists, it can
> >  also be used to protect arrays.  Three situations are as follows:
> > @@ -26,6 +28,7 @@ described in the following sections.
> >
> >
> >  Situation 1: Hash Tables
> > +------------------------
> >
> >  Hash tables are often implemented as an array, where each array entry
> >  has a linked-list hash chain.  Each hash chain can be protected by RCU
> > @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
> >
> >
> >  Situation 2: Static Arrays
> > +--------------------------
> >
> >  Static arrays, where the data (rather than a pointer to the data) is
> >  located in each array element, and where the array is never resized,
> > @@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel
> recommends using seqlock in
> >  this situation, which would also have minimal read-side overhead as long
> >  as updates are rare.
> >
> > -Quick Quiz:  Why is it so important that updates be rare when
> > -          using seqlock?
> > +Quick Quiz:
>
> The above line added trailing whitespace.  I removed it for you, but
> please check for this on future submissions.  ;-)
>
Sure, I will take care of this next time.

>
>                                                         Thanx, Paul
>
> > +             Why is it so important that updates be rare when using
> seqlock?
> >
> > +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
> >
> >  Situation 3: Resizeable Arrays
> > +------------------------------
> >
> >  Use of RCU for resizeable arrays is demonstrated by the grow_ary()
> >  function formerly used by the System V IPC code.  The array is used
> > @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries
> pointer to point to
> >  the new array, and invokes ipc_rcu_putref() to free up the old array.
> >  Note that rcu_assign_pointer() is used to update the ids->entries
> pointer,
> >  which includes any memory barriers required on whatever architecture
> > -you are running on.
> > +you are running on.::
> >
> >       static int grow_ary(struct ipc_ids* ids, int newsize)
> >       {
> > @@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the
> structure corresponding
> >  to the desired IPC object is placed in "out", with NULL indicating
> >  a non-existent entry.  After acquiring "out->lock", the "out->deleted"
> >  flag indicates whether the IPC object is in the process of being
> > -deleted, and, if not, the pointer is returned.
> > +deleted, and, if not, the pointer is returned.::
> >
> >       struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
> >       {
> > @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
> >               return out;
> >       }
> >
> > +.. _answer_quick_quiz_seqlock:
> >
> >  Answer to Quick Quiz:
> > +     Why is it so important that updates be rare when using seqlock?
> >
> >       The reason that it is important that updates be rare when
> >       using seqlock is that frequent updates can livelock readers.
> > diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> > index 5c99185710fa..8d20d44f8fd4 100644
> > --- a/Documentation/RCU/index.rst
> > +++ b/Documentation/RCU/index.rst
> > @@ -7,6 +7,7 @@ RCU concepts
> >  .. toctree::
> >     :maxdepth: 3
> >
> > +   arrayRCU
> >     rcu
> >     listRCU
> >     UP
> > --
> > 2.17.1
> >
>
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20191029/6ffc7074/attachment.html>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-10-28 21:06   ` madhuparnabhowmik04
@ 2019-10-28 21:06     ` Madhuparna Bhowmik
  0 siblings, 0 replies; 11+ messages in thread
From: Madhuparna Bhowmik @ 2019-10-28 21:06 UTC (permalink / raw)


On Tue, Oct 29, 2019 at 2:30 AM Paul E. McKenney <paulmck at kernel.org> wrote:

> On Tue, Oct 29, 2019 at 01:54:17AM +0530, madhuparnabhowmik04 at gmail.com
> wrote:
> > From: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
> >
> > This patch converts arrayRCU from txt to rst format.
> > arrayRCU.rst is also added in the index.rst file.
> >
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com>
>
> Much better, thank you!
>
> I queued this with a small but important change called out below.
>
Thank you!

>
> > ---
> >  .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
> >  Documentation/RCU/index.rst                    |  1 +
> >  2 files changed, 14 insertions(+), 5 deletions(-)
> >  rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)
> >
> > diff --git a/Documentation/RCU/arrayRCU.txt
> b/Documentation/RCU/arrayRCU.rst
> > similarity index 91%
> > rename from Documentation/RCU/arrayRCU.txt
> > rename to Documentation/RCU/arrayRCU.rst
> > index f05a9afb2c39..ed5ae24b196e 100644
> > --- a/Documentation/RCU/arrayRCU.txt
> > +++ b/Documentation/RCU/arrayRCU.rst
> > @@ -1,5 +1,7 @@
> > -Using RCU to Protect Read-Mostly Arrays
> > +.. _array_rcu_doc:
> >
> > +Using RCU to Protect Read-Mostly Arrays
> > +=======================================
> >
> >  Although RCU is more commonly used to protect linked lists, it can
> >  also be used to protect arrays.  Three situations are as follows:
> > @@ -26,6 +28,7 @@ described in the following sections.
> >
> >
> >  Situation 1: Hash Tables
> > +------------------------
> >
> >  Hash tables are often implemented as an array, where each array entry
> >  has a linked-list hash chain.  Each hash chain can be protected by RCU
> > @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
> >
> >
> >  Situation 2: Static Arrays
> > +--------------------------
> >
> >  Static arrays, where the data (rather than a pointer to the data) is
> >  located in each array element, and where the array is never resized,
> > @@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel
> recommends using seqlock in
> >  this situation, which would also have minimal read-side overhead as long
> >  as updates are rare.
> >
> > -Quick Quiz:  Why is it so important that updates be rare when
> > -          using seqlock?
> > +Quick Quiz:
>
> The above line added trailing whitespace.  I removed it for you, but
> please check for this on future submissions.  ;-)
>
Sure, I will take care of this next time.

>
>                                                         Thanx, Paul
>
> > +             Why is it so important that updates be rare when using
> seqlock?
> >
> > +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
> >
> >  Situation 3: Resizeable Arrays
> > +------------------------------
> >
> >  Use of RCU for resizeable arrays is demonstrated by the grow_ary()
> >  function formerly used by the System V IPC code.  The array is used
> > @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries
> pointer to point to
> >  the new array, and invokes ipc_rcu_putref() to free up the old array.
> >  Note that rcu_assign_pointer() is used to update the ids->entries
> pointer,
> >  which includes any memory barriers required on whatever architecture
> > -you are running on.
> > +you are running on.::
> >
> >       static int grow_ary(struct ipc_ids* ids, int newsize)
> >       {
> > @@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the
> structure corresponding
> >  to the desired IPC object is placed in "out", with NULL indicating
> >  a non-existent entry.  After acquiring "out->lock", the "out->deleted"
> >  flag indicates whether the IPC object is in the process of being
> > -deleted, and, if not, the pointer is returned.
> > +deleted, and, if not, the pointer is returned.::
> >
> >       struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
> >       {
> > @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
> >               return out;
> >       }
> >
> > +.. _answer_quick_quiz_seqlock:
> >
> >  Answer to Quick Quiz:
> > +     Why is it so important that updates be rare when using seqlock?
> >
> >       The reason that it is important that updates be rare when
> >       using seqlock is that frequent updates can livelock readers.
> > diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> > index 5c99185710fa..8d20d44f8fd4 100644
> > --- a/Documentation/RCU/index.rst
> > +++ b/Documentation/RCU/index.rst
> > @@ -7,6 +7,7 @@ RCU concepts
> >  .. toctree::
> >     :maxdepth: 3
> >
> > +   arrayRCU
> >     rcu
> >     listRCU
> >     UP
> > --
> > 2.17.1
> >
>
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20191029/6ffc7074/attachment.html>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-10-28 20:24 [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst madhuparnabhowmik04
  2019-10-28 20:24 ` madhuparnabhowmik04
  2019-10-28 21:00 ` paulmck
@ 2019-11-05 13:49 ` Phong Tran
  2019-11-05 14:04   ` Paul E. McKenney
  2 siblings, 1 reply; 11+ messages in thread
From: Phong Tran @ 2019-11-05 13:49 UTC (permalink / raw)
  To: madhuparnabhowmik04
  Cc: paulmck, corbet, linux-doc, linux-kernel, rcu, joel,
	linux-kernel-mentees

On 10/29/19 3:24 AM, madhuparnabhowmik04@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> 
> This patch converts arrayRCU from txt to rst format.
> arrayRCU.rst is also added in the index.rst file.
> 
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> ---
>   .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
>   Documentation/RCU/index.rst                    |  1 +
>   2 files changed, 14 insertions(+), 5 deletions(-)
>   rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)
> 
> diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst
> similarity index 91%
> rename from Documentation/RCU/arrayRCU.txt
> rename to Documentation/RCU/arrayRCU.rst
> index f05a9afb2c39..ed5ae24b196e 100644
> --- a/Documentation/RCU/arrayRCU.txt
> +++ b/Documentation/RCU/arrayRCU.rst
> @@ -1,5 +1,7 @@
> -Using RCU to Protect Read-Mostly Arrays
> +.. _array_rcu_doc:
>   
> +Using RCU to Protect Read-Mostly Arrays
> +=======================================
>   
>   Although RCU is more commonly used to protect linked lists, it can
>   also be used to protect arrays.  Three situations are as follows:
> @@ -26,6 +28,7 @@ described in the following sections.
>   
>   

It will be better to have the cross reference for each situation.

Hash Tables
Static Arrays
Resizeable Arrays

>   Situation 1: Hash Tables
> +------------------------
>   
>   Hash tables are often implemented as an array, where each array entry
>   has a linked-list hash chain.  Each hash chain can be protected by RCU
> @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
>   
>   
>   Situation 2: Static Arrays
> +--------------------------
>   
>   Static arrays, where the data (rather than a pointer to the data) is
>   located in each array element, and where the array is never resized,
> @@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel recommends using seqlock in
>   this situation, which would also have minimal read-side overhead as long
>   as updates are rare.
>   
> -Quick Quiz:  Why is it so important that updates be rare when
> -	     using seqlock?
> +Quick Quiz:
> +		Why is it so important that updates be rare when using seqlock?
>   
> +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
>   
>   Situation 3: Resizeable Arrays
> +------------------------------
>   
>   Use of RCU for resizeable arrays is demonstrated by the grow_ary()
>   function formerly used by the System V IPC code.  The array is used
> @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to
>   the new array, and invokes ipc_rcu_putref() to free up the old array.
>   Note that rcu_assign_pointer() is used to update the ids->entries pointer,
>   which includes any memory barriers required on whatever architecture
> -you are running on.
> +you are running on.::
>   

a redundant ":" in here with html page.




>   	static int grow_ary(struct ipc_ids* ids, int newsize)
>   	{
> @@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the structure corresponding
>   to the desired IPC object is placed in "out", with NULL indicating
>   a non-existent entry.  After acquiring "out->lock", the "out->deleted"
>   flag indicates whether the IPC object is in the process of being
> -deleted, and, if not, the pointer is returned.
> +deleted, and, if not, the pointer is returned.::
>   

same as above


Tested-by: Phong Tran <tranmanphong@gmail.com>

Regards,
Phong.

>   	struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
>   	{
> @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
>   		return out;
>   	}
>   
> +.. _answer_quick_quiz_seqlock:
>   
>   Answer to Quick Quiz:
> +	Why is it so important that updates be rare when using seqlock?
>   
>   	The reason that it is important that updates be rare when
>   	using seqlock is that frequent updates can livelock readers.
> diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> index 5c99185710fa..8d20d44f8fd4 100644
> --- a/Documentation/RCU/index.rst
> +++ b/Documentation/RCU/index.rst
> @@ -7,6 +7,7 @@ RCU concepts
>   .. toctree::
>      :maxdepth: 3
>   
> +   arrayRCU
>      rcu
>      listRCU
>      UP
> 
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-11-05 13:49 ` Phong Tran
@ 2019-11-05 14:04   ` Paul E. McKenney
  2019-11-05 14:33     ` Amol Grover
  0 siblings, 1 reply; 11+ messages in thread
From: Paul E. McKenney @ 2019-11-05 14:04 UTC (permalink / raw)
  To: Phong Tran
  Cc: corbet, linux-doc, linux-kernel, rcu, joel, linux-kernel-mentees

On Tue, Nov 05, 2019 at 08:49:47PM +0700, Phong Tran wrote:
> On 10/29/19 3:24 AM, madhuparnabhowmik04@gmail.com wrote:
> > From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> > 
> > This patch converts arrayRCU from txt to rst format.
> > arrayRCU.rst is also added in the index.rst file.
> > 
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> > ---
> >   .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
> >   Documentation/RCU/index.rst                    |  1 +
> >   2 files changed, 14 insertions(+), 5 deletions(-)
> >   rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)
> > 
> > diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst
> > similarity index 91%
> > rename from Documentation/RCU/arrayRCU.txt
> > rename to Documentation/RCU/arrayRCU.rst
> > index f05a9afb2c39..ed5ae24b196e 100644
> > --- a/Documentation/RCU/arrayRCU.txt
> > +++ b/Documentation/RCU/arrayRCU.rst
> > @@ -1,5 +1,7 @@
> > -Using RCU to Protect Read-Mostly Arrays
> > +.. _array_rcu_doc:
> > +Using RCU to Protect Read-Mostly Arrays
> > +=======================================
> >   Although RCU is more commonly used to protect linked lists, it can
> >   also be used to protect arrays.  Three situations are as follows:
> > @@ -26,6 +28,7 @@ described in the following sections.
> 
> It will be better to have the cross reference for each situation.
> 
> Hash Tables
> Static Arrays
> Resizeable Arrays

Madhuparna, could you please put a patch together creating these
cross-references and handling Phong's comments below (probably
by getting rid of the "." so that the resulting ":" doesn't look
strange)?

Then I will fold that patch into your original commit in -rcu and
add Phong's Tested-by.

							Thanx, Paul

> >   Situation 1: Hash Tables
> > +------------------------
> >   Hash tables are often implemented as an array, where each array entry
> >   has a linked-list hash chain.  Each hash chain can be protected by RCU
> > @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
> >   Situation 2: Static Arrays
> > +--------------------------
> >   Static arrays, where the data (rather than a pointer to the data) is
> >   located in each array element, and where the array is never resized,
> > @@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel recommends using seqlock in
> >   this situation, which would also have minimal read-side overhead as long
> >   as updates are rare.
> > -Quick Quiz:  Why is it so important that updates be rare when
> > -	     using seqlock?
> > +Quick Quiz:
> > +		Why is it so important that updates be rare when using seqlock?
> > +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
> >   Situation 3: Resizeable Arrays
> > +------------------------------
> >   Use of RCU for resizeable arrays is demonstrated by the grow_ary()
> >   function formerly used by the System V IPC code.  The array is used
> > @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to
> >   the new array, and invokes ipc_rcu_putref() to free up the old array.
> >   Note that rcu_assign_pointer() is used to update the ids->entries pointer,
> >   which includes any memory barriers required on whatever architecture
> > -you are running on.
> > +you are running on.::
> 
> a redundant ":" in here with html page.
> 
> 
> 
> 
> >   	static int grow_ary(struct ipc_ids* ids, int newsize)
> >   	{
> > @@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the structure corresponding
> >   to the desired IPC object is placed in "out", with NULL indicating
> >   a non-existent entry.  After acquiring "out->lock", the "out->deleted"
> >   flag indicates whether the IPC object is in the process of being
> > -deleted, and, if not, the pointer is returned.
> > +deleted, and, if not, the pointer is returned.::
> 
> same as above
> 
> 
> Tested-by: Phong Tran <tranmanphong@gmail.com>
> 
> Regards,
> Phong.
> 
> >   	struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
> >   	{
> > @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
> >   		return out;
> >   	}
> > +.. _answer_quick_quiz_seqlock:
> >   Answer to Quick Quiz:
> > +	Why is it so important that updates be rare when using seqlock?
> >   	The reason that it is important that updates be rare when
> >   	using seqlock is that frequent updates can livelock readers.
> > diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> > index 5c99185710fa..8d20d44f8fd4 100644
> > --- a/Documentation/RCU/index.rst
> > +++ b/Documentation/RCU/index.rst
> > @@ -7,6 +7,7 @@ RCU concepts
> >   .. toctree::
> >      :maxdepth: 3
> > +   arrayRCU
> >      rcu
> >      listRCU
> >      UP
> > 
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-11-05 14:04   ` Paul E. McKenney
@ 2019-11-05 14:33     ` Amol Grover
  2019-11-05 14:45       ` Paul E. McKenney
  0 siblings, 1 reply; 11+ messages in thread
From: Amol Grover @ 2019-11-05 14:33 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-doc, corbet, linux-kernel, rcu, joel, linux-kernel-mentees

On Tue, Nov 05, 2019 at 06:04:11AM -0800, Paul E. McKenney wrote:
> On Tue, Nov 05, 2019 at 08:49:47PM +0700, Phong Tran wrote:
> > On 10/29/19 3:24 AM, madhuparnabhowmik04@gmail.com wrote:
> > > From: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> > > 
> > > This patch converts arrayRCU from txt to rst format.
> > > arrayRCU.rst is also added in the index.rst file.
> > > 
> > > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
> > > ---
> > >   .../RCU/{arrayRCU.txt => arrayRCU.rst}         | 18 +++++++++++++-----
> > >   Documentation/RCU/index.rst                    |  1 +
> > >   2 files changed, 14 insertions(+), 5 deletions(-)
> > >   rename Documentation/RCU/{arrayRCU.txt => arrayRCU.rst} (91%)
> > > 
> > > diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.rst
> > > similarity index 91%
> > > rename from Documentation/RCU/arrayRCU.txt
> > > rename to Documentation/RCU/arrayRCU.rst
> > > index f05a9afb2c39..ed5ae24b196e 100644
> > > --- a/Documentation/RCU/arrayRCU.txt
> > > +++ b/Documentation/RCU/arrayRCU.rst
> > > @@ -1,5 +1,7 @@
> > > -Using RCU to Protect Read-Mostly Arrays
> > > +.. _array_rcu_doc:
> > > +Using RCU to Protect Read-Mostly Arrays
> > > +=======================================
> > >   Although RCU is more commonly used to protect linked lists, it can
> > >   also be used to protect arrays.  Three situations are as follows:
> > > @@ -26,6 +28,7 @@ described in the following sections.
> > 
> > It will be better to have the cross reference for each situation.
> > 
> > Hash Tables
> > Static Arrays
> > Resizeable Arrays
> 
> Madhuparna, could you please put a patch together creating these
> cross-references and handling Phong's comments below (probably
> by getting rid of the "." so that the resulting ":" doesn't look
> strange)?
> 
> Then I will fold that patch into your original commit in -rcu and
> add Phong's Tested-by.
> 
> 							Thanx, Paul
> 
> > >   Situation 1: Hash Tables
> > > +------------------------
> > >   Hash tables are often implemented as an array, where each array entry
> > >   has a linked-list hash chain.  Each hash chain can be protected by RCU
> > > @@ -34,6 +37,7 @@ to other array-of-list situations, such as radix trees.
> > >   Situation 2: Static Arrays
> > > +--------------------------
> > >   Static arrays, where the data (rather than a pointer to the data) is
> > >   located in each array element, and where the array is never resized,
> > > @@ -41,11 +45,13 @@ have not been used with RCU.  Rik van Riel recommends using seqlock in
> > >   this situation, which would also have minimal read-side overhead as long
> > >   as updates are rare.
> > > -Quick Quiz:  Why is it so important that updates be rare when
> > > -	     using seqlock?
> > > +Quick Quiz:
> > > +		Why is it so important that updates be rare when using seqlock?
> > > +:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
> > >   Situation 3: Resizeable Arrays
> > > +------------------------------
> > >   Use of RCU for resizeable arrays is demonstrated by the grow_ary()
> > >   function formerly used by the System V IPC code.  The array is used
> > > @@ -60,7 +66,7 @@ the remainder of the new, updates the ids->entries pointer to point to
> > >   the new array, and invokes ipc_rcu_putref() to free up the old array.
> > >   Note that rcu_assign_pointer() is used to update the ids->entries pointer,
> > >   which includes any memory barriers required on whatever architecture
> > > -you are running on.
> > > +you are running on.::
> > 
> > a redundant ":" in here with html page.
> > 
> > 
> > 
> > 
> > >   	static int grow_ary(struct ipc_ids* ids, int newsize)
> > >   	{
> > > @@ -112,7 +118,7 @@ a simple check suffices.  The pointer to the structure corresponding
> > >   to the desired IPC object is placed in "out", with NULL indicating
> > >   a non-existent entry.  After acquiring "out->lock", the "out->deleted"
> > >   flag indicates whether the IPC object is in the process of being
> > > -deleted, and, if not, the pointer is returned.
> > > +deleted, and, if not, the pointer is returned.::
> > 
> > same as above
> > 
> > 
> > Tested-by: Phong Tran <tranmanphong@gmail.com>
> > 
> > Regards,
> > Phong.
> > 
> > >   	struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
> > >   	{
> > > @@ -144,8 +150,10 @@ deleted, and, if not, the pointer is returned.
> > >   		return out;
> > >   	}
> > > +.. _answer_quick_quiz_seqlock:
> > >   Answer to Quick Quiz:
> > > +	Why is it so important that updates be rare when using seqlock?
> > >   	The reason that it is important that updates be rare when
> > >   	using seqlock is that frequent updates can livelock readers.
> > > diff --git a/Documentation/RCU/index.rst b/Documentation/RCU/index.rst
> > > index 5c99185710fa..8d20d44f8fd4 100644
> > > --- a/Documentation/RCU/index.rst
> > > +++ b/Documentation/RCU/index.rst
> > > @@ -7,6 +7,7 @@ RCU concepts
> > >   .. toctree::
> > >      :maxdepth: 3
> > > +   arrayRCU
> > >      rcu
> > >      listRCU
> > >      UP
> > > 
> _______________________________________________
> Linux-kernel-mentees mailing list
> Linux-kernel-mentees@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

Hey,
There are a few instances in the document where words are
emphasized. Example, -not- in the first paragraph. The 
previous emphasis was correct wrt txt format, but this
could be converted to italicize/bold to keep up with the
reST format. Other than this and what Phong suggested,
everything looks good!

Tested-by: Amol Grover <frextrite@gmail.com>

Thank you
Amol
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-11-05 14:33     ` Amol Grover
@ 2019-11-05 14:45       ` Paul E. McKenney
  2019-11-05 21:35         ` Madhuparna Bhowmik
  0 siblings, 1 reply; 11+ messages in thread
From: Paul E. McKenney @ 2019-11-05 14:45 UTC (permalink / raw)
  To: Amol Grover
  Cc: linux-doc, corbet, linux-kernel, rcu, joel, linux-kernel-mentees

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

Thank you, Amol!

Madhuparna, could you please also include a fix to the "-not-"
text-emphasis issue (and any other occurrences) that Amol located?

I can then add both Phong's and Amol's Tested-by.

							Thanx, Paul
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst
  2019-11-05 14:45       ` Paul E. McKenney
@ 2019-11-05 21:35         ` Madhuparna Bhowmik
  0 siblings, 0 replies; 11+ messages in thread
From: Madhuparna Bhowmik @ 2019-11-05 21:35 UTC (permalink / raw)
  To: paulmck
  Cc: corbet, linux-doc, linux-kernel, rcu, Joel Fernandes,
	linux-kernel-mentees


[-- Attachment #1.1: Type: text/plain, Size: 7133 bytes --]

Thank you Amol and Phong for your valuable feedback. I have made the
changes requested and sent the patch.

https://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/2019-November/001055.html

Regards,
Madhuparna
ᐧ

On Tue, Nov 5, 2019 at 8:15 PM Paul E. McKenney <paulmck@kernel.org> wrote:

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

[-- Attachment #1.2: Type: text/html, Size: 10332 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-11-05 21:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 20:24 [Linux-kernel-mentees] [PATCH] Documentation: RCU: arrayRCU: Converted arrayRCU.txt to arrayRCU.rst madhuparnabhowmik04
2019-10-28 20:24 ` madhuparnabhowmik04
2019-10-28 21:00 ` paulmck
2019-10-28 21:00   ` Paul E. McKenney
2019-10-28 21:06   ` madhuparnabhowmik04
2019-10-28 21:06     ` Madhuparna Bhowmik
2019-11-05 13:49 ` Phong Tran
2019-11-05 14:04   ` Paul E. McKenney
2019-11-05 14:33     ` Amol Grover
2019-11-05 14:45       ` Paul E. McKenney
2019-11-05 21:35         ` Madhuparna Bhowmik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).