From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Harvey Harrison <harvey.harrison@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] Final removal of FASTCALL()/fastcall
Date: Mon, 11 Feb 2008 17:49:08 -0800 [thread overview]
Message-ID: <20080212014908.GE29254@linux.vnet.ibm.com> (raw)
In-Reply-To: <20080211131738.dda66683.akpm@linux-foundation.org>
On Mon, Feb 11, 2008 at 01:17:38PM -0800, Andrew Morton wrote:
> On Mon, 11 Feb 2008 10:38:42 -0800
> Harvey Harrison <harvey.harrison@gmail.com> wrote:
>
> > All users are gone, remove definitions and comments referring
> > to them.
>
> I'm still showing occurrences in:
>
> ./Documentation/RCU/NMI-RCU.txt
> ./Documentation/kprobes.txt
> ./Documentation/uml/UserModeLinux-HOWTO.txt
> ./kernel/rcupdate.c
>
> The last one is interesting:
>
> /* FASTCALL no longer exists, this wrapper may no longer be needed */
> static void wakeme_after_rcu(struct rcu_head *head)
> {
> struct rcu_synchronize *rcu;
>
> rcu = container_of(head, struct rcu_synchronize, head);
> complete(&rcu->completion);
> }
>
> The comment is rather ungrammatical/meaningless. Perhaps it is trying
> to tell us that we can remove this function now?
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;
prev parent reply other threads:[~2008-02-12 1:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 18:38 [PATCH 3/3] Final removal of FASTCALL()/fastcall Harvey Harrison
2008-02-11 21:17 ` Andrew Morton
2008-02-11 21:26 ` Harvey Harrison
2008-02-11 21:45 ` [PATCH 4/3] Documentation: Remove references to FASTCALL/fastcall Harvey Harrison
2008-02-12 1:49 ` Paul E. McKenney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080212014908.GE29254@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=harvey.harrison@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.