Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Monday, February 11, 2008 - 6:49 pm

On Mon, Feb 11, 2008 at 01:17:38PM -0800, Andrew Morton wrote:

Hmmm...  A better comment might be something like "Awaken the
corresponding synchronize_rcu() instance now that a grace period has
completed".  Given that the underlying RCU implementation provides
callbacks, synchronize_rcu() will need some sort of callback function.

So, the question is whether "complete()" can be that callback function.
As near as I can tell, the answer is "no", because the RCU callback
function always gets a pointer to a struct rcu_head, which would not
make much sense to the "complete()" function.

In short, I believe that wakeme_after_rcu() needs to stick around.
A better comment for wakeme_after_rcu() would be good, perhaps as shown below.

						Thanx, Paul

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

 rcupdate.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -urpNa -X dontdiff linux-2.6.24/kernel/rcupdate.c linux-2.6.24-wakeme-comment/kernel/rcupdate.c
--- linux-2.6.24/kernel/rcupdate.c	2008-01-24 14:58:37.000000000 -0800
+++ linux-2.6.24-wakeme-comment/kernel/rcupdate.c	2008-02-11 17:47:11.000000000 -0800
@@ -601,7 +601,10 @@ struct rcu_synchronize {
 	struct completion completion;
 };
 
-/* Because of FASTCALL declaration of complete, we use this wrapper */
+/*
+ * Awaken the corresponding synchronize_rcu() instance now that a
+ * grace period has elapsed.
+ */
 static void wakeme_after_rcu(struct rcu_head  *head)
 {
 	struct rcu_synchronize *rcu;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] Final removal of FASTCALL()/fastcall, Harvey Harrison, (Mon Feb 11, 11:38 am)
Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall, Andrew Morton, (Mon Feb 11, 2:17 pm)
Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall, Harvey Harrison, (Mon Feb 11, 2:26 pm)
Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall, Paul E. McKenney, (Mon Feb 11, 6:49 pm)