All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch] RCU: add comments to rcu_pending/rcu_needs_cpu
Date: Mon, 1 May 2006 14:57:23 -0700	[thread overview]
Message-ID: <20060501215723.GE1305@us.ibm.com> (raw)
In-Reply-To: <20060427081156.GB9457@osiris.boeblingen.de.ibm.com>

On Thu, Apr 27, 2006 at 10:11:56AM +0200, Heiko Carstens wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> 
> Add some comments to rcu_pending() and rcu_needs_cpu().
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
> 
> Wording might be poor, but probably better than no comments at all.

But these are internal interfaces for RCU, so doesn't seem like they
should go into docbook.  Quite different than (say) rcu_read_lock()
or call_rcu().

How about something like the following instead?

						Thanx, Paul

Signed-off-by: <paulmck@us.ibm.com>
---

diff -urpNa -X dontdiff linux-2.6.17-rc3-rnc/kernel/rcupdate.c linux-2.6.17-rc3-rnc.pem/kernel/rcupdate.c
--- linux-2.6.17-rc3-rnc/kernel/rcupdate.c	2006-05-01 14:42:30.000000000 -0700
+++ linux-2.6.17-rc3-rnc.pem/kernel/rcupdate.c	2006-05-01 14:48:19.000000000 -0700
@@ -479,12 +479,25 @@ static int __rcu_pending(struct rcu_ctrl
 	return 0;
 }
 
+/*
+ * Check to see if there is any immediate RCU-related work to be done
+ * by the current CPU, returning 1 if so.  This function is part of the
+ * RCU implementation; it is -not- an exported member of the RCU API.
+ */
+
 int rcu_pending(int cpu)
 {
 	return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)) ||
 		__rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
 }
 
+/* 
+ * Check to see if any future RCU-related work will need to be done
+ * by the current CPU, even if none need be done immediately, returning
+ * 1 if so.  This function is part of the RCU implementation; it is -not-
+ * an exported member of the RCU API.
+ */
+
 int rcu_needs_cpu(int cpu)
 {
 	struct rcu_data *rdp = &per_cpu(rcu_data, cpu);

  reply	other threads:[~2006-05-01 21:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 11:11 [patch] RCU: introduce rcu_soon_pending() interface Heiko Carstens
2006-04-24 23:09 ` Andrew Morton
2006-04-25  5:27   ` Heiko Carstens
2006-04-25 11:46     ` Paul E. McKenney
2006-04-25 11:52       ` Heiko Carstens
2006-04-25 12:08         ` Paul E. McKenney
2006-04-25 12:27           ` [patch] RCU: introduce rcu_needs_cpu() interface Heiko Carstens
     [not found]             ` <20060426141205.58675763.akpm@osdl.org>
2006-04-27  8:11               ` [patch] RCU: add comments to rcu_pending/rcu_needs_cpu Heiko Carstens
2006-05-01 21:57                 ` Paul E. McKenney [this message]
2006-05-02  6:35                   ` Heiko Carstens
2006-04-25 12:28           ` [patch] s390: exploit rcu_needs_cpu() interface Heiko Carstens
2006-04-25 11:23   ` [patch] RCU: introduce rcu_soon_pending() interface Paul E. McKenney
2006-04-25 11:33     ` Martin Schwidefsky
2006-04-25 11:48       ` Paul E. McKenney

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=20060501215723.GE1305@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=heiko.carstens@de.ibm.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.