Skip to contentSkip to conversation

Doc: Fix missing whitespaces in RCU documentation.

PATCH In review Jesper Dangaard Brouer 2 participants 5 messages Mar 6, 2009 – Mar 9, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Doc: Fix missing whitespaces in RCU documentation.

Trivial fix while reading through the RCU docs.

---

 Documentation/RCU/rcu.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/RCU/rcu.txt +1 -1
index 95821a2..7aa2002 100644
@@ -81,7 +81,7 @@ o	I hear that RCU needs work in order to support realtime kernels?
 	This work is largely completed.  Realtime-friendly RCU can be
 	enabled via the CONFIG_PREEMPT_RCU kernel configuration parameter.
 	However, work is in progress for enabling priority boosting of
-	preempted RCU read-side critical sections.This is needed if you
+	preempted RCU read-side critical sections.  This is needed if you
 	have CPU-bound realtime threads.
 
 o	Where can I find more information on RCU?
#1 lore raw

PATCH 2/2 Doc: Fix wrong API example usage of call_rcu().

At some point the API of call_rcu() changed from three parameters to two parameters, correct the documentation.

One confusing thing in RCU/listRCU.txt, which is NOT fixed in this patch, is that no reason or explaination is given for using call_rcu() instead of the normal synchronize_rcu() call.

---

 Documentation/RCU/listRCU.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Documentation/RCU/listRCU.txt +3 -3
index 1fd1753..4349c14 100644
@@ -118,7 +118,7 @@ Following are the RCU equivalents for these two functions:
 		list_for_each_entry(e, list, list) {
 			if (!audit_compare_rule(rule, &e->rule)) {
 				list_del_rcu(&e->list);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
@@ -206,7 +206,7 @@ RCU ("read-copy update") its name.  The RCU code is as follows:
 				ne->rule.action = newaction;
 				ne->rule.file_count = newfield_count;
 				list_replace_rcu(e, ne);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
@@ -283,7 +283,7 @@ flag under the spinlock as follows:
 				list_del_rcu(&e->list);
 				e->deleted = 1;
 				spin_unlock(&e->lock);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] Doc: Fix wrong API example usage of call_rcu().

Quoted 6 lines · Jesper Dangaard Brouer

At some point the API of call_rcu() changed from three parameters to two parameters, correct the documentation.

One confusing thing in RCU/listRCU.txt, which is NOT fixed in this patch, is that no reason or explaination is given for using call_rcu() instead of the normal synchronize_rcu() call.

Good catch!!! Indeed, call_rcu() did take three arguments at one time, like back in 2.5 days...

On the use of call_rcu() vs. synchronize_rcu(), the two possible reasons called out in question 8 in Documentation/RCU/checklist.txt are:

1. Update performance is important.

2. Updaters cannot block.

I would welcome a patch to this file discussing this.

Quoted 38 lines

---

 Documentation/RCU/listRCU.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Documentation/RCU/listRCU.txt +3 -3
index 1fd1753..4349c14 100644
@@ -118,7 +118,7 @@ Following are the RCU equivalents for these two functions:
 		list_for_each_entry(e, list, list) {
 			if (!audit_compare_rule(rule, &e->rule)) {
 				list_del_rcu(&e->list);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
@@ -206,7 +206,7 @@ RCU ("read-copy update") its name.  The RCU code is as follows:
 				ne->rule.action = newaction;
 				ne->rule.file_count = newfield_count;
 				list_replace_rcu(e, ne);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
@@ -283,7 +283,7 @@ flag under the spinlock as follows:
 				list_del_rcu(&e->list);
 				e->deleted = 1;
 				spin_unlock(&e->lock);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
#3 lore raw

Re: [PATCH 2/2] Doc: Fix wrong API example usage of call_rcu().

Quoted 11 lines · Paul E. McKenney
Quoted 6 lines · Jesper Dangaard Brouer

At some point the API of call_rcu() changed from three parameters to two parameters, correct the documentation.

One confusing thing in RCU/listRCU.txt, which is NOT fixed in this patch, is that no reason or explaination is given for using call_rcu() instead of the normal synchronize_rcu() call.

Good catch!!! Indeed, call_rcu() did take three arguments at one time, like back in 2.5 days...

Quoted 6 lines

On the use of call_rcu() vs. synchronize_rcu(), the two possible reasons called out in question 8 in Documentation/RCU/checklist.txt are:

1. Update performance is important.

2. Updaters cannot block.

And an important special case of #2 is when the update is being carried out within an RCU read-side critical section, FWIW.

Thanx, Paul

Quoted 42 lines

I would welcome a patch to this file discussing this.

Quoted 38 lines

---

 Documentation/RCU/listRCU.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Documentation/RCU/listRCU.txt +3 -3
index 1fd1753..4349c14 100644
@@ -118,7 +118,7 @@ Following are the RCU equivalents for these two functions:
 		list_for_each_entry(e, list, list) {
 			if (!audit_compare_rule(rule, &e->rule)) {
 				list_del_rcu(&e->list);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
@@ -206,7 +206,7 @@ RCU ("read-copy update") its name.  The RCU code is as follows:
 				ne->rule.action = newaction;
 				ne->rule.file_count = newfield_count;
 				list_replace_rcu(e, ne);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
@@ -283,7 +283,7 @@ flag under the spinlock as follows:
 				list_del_rcu(&e->list);
 				e->deleted = 1;
 				spin_unlock(&e->lock);
-				call_rcu(&e->rcu, audit_free_rule, e);
+				call_rcu(&e->rcu, audit_free_rule);
 				return 0;
 			}
 		}
Reviewed-by on v1 1/2
#4 lore raw
In reply to Jesper Dangaard Brouer
Quoted 1 line · Jesper Dangaard Brouer

Trivial fix while reading through the RCU docs.

Good eyes!

Quoted 20 lines

---

 Documentation/RCU/rcu.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/RCU/rcu.txt +1 -1
index 95821a2..7aa2002 100644
@@ -81,7 +81,7 @@ o	I hear that RCU needs work in order to support realtime kernels?
 	This work is largely completed.  Realtime-friendly RCU can be
 	enabled via the CONFIG_PREEMPT_RCU kernel configuration parameter.
 	However, work is in progress for enabling priority boosting of
-	preempted RCU read-side critical sections.This is needed if you
+	preempted RCU read-side critical sections.  This is needed if you
 	have CPU-bound realtime threads.
 
 o	Where can I find more information on RCU?