From: tip-bot for Ingo Molnar <mingo@elte.hu>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
paulmck@linux.vnet.ibm.com, dhowells@redhat.com,
tglx@linutronix.de, josh@joshtriplett.org, mingo@elte.hu
Subject: [tip:core/rcu] rcu: Do tiny cleanups in rcutiny
Date: Mon, 26 Oct 2009 11:37:58 GMT [thread overview]
Message-ID: <tip-4ce5b90340879ce93d169b7b523c2cbbe7c45843@git.kernel.org> (raw)
In-Reply-To: <12565226351355-git-send-email->
Commit-ID: 4ce5b90340879ce93d169b7b523c2cbbe7c45843
Gitweb: http://git.kernel.org/tip/4ce5b90340879ce93d169b7b523c2cbbe7c45843
Author: Ingo Molnar <mingo@elte.hu>
AuthorDate: Mon, 26 Oct 2009 07:55:55 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 26 Oct 2009 09:40:40 +0100
rcu: Do tiny cleanups in rcutiny
No change in functionality - just straighten out a few small
stylistic details.
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: avi@redhat.com
Cc: mtosatti@redhat.com
LKML-Reference: <12565226351355-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/rcutiny.h | 6 +---
kernel/rcutiny.c | 49 ++++++++++++++++++++++------------------------
2 files changed, 25 insertions(+), 30 deletions(-)
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 891073c..2c1fe83 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -20,9 +20,8 @@
* Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
*
* For detailed explanation of Read-Copy Update mechanism see -
- * Documentation/RCU
+ * Documentation/RCU
*/
-
#ifndef __LINUX_TINY_H
#define __LINUX_TINY_H
@@ -70,8 +69,7 @@ static inline void synchronize_rcu_bh_expedited(void)
}
struct notifier_block;
-extern int rcu_cpu_notify(struct notifier_block *self,
- unsigned long action, void *hcpu);
+extern int rcu_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu);
#ifdef CONFIG_NO_HZ
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index 0b54efd..b33ec3a 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -20,22 +20,21 @@
* Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
*
* For detailed explanation of Read-Copy Update mechanism see -
- * Documentation/RCU
+ * Documentation/RCU
*/
-
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/rcupdate.h>
-#include <linux/interrupt.h>
-#include <linux/sched.h>
-#include <linux/module.h>
-#include <linux/completion.h>
#include <linux/moduleparam.h>
+#include <linux/completion.h>
+#include <linux/interrupt.h>
#include <linux/notifier.h>
-#include <linux/cpu.h>
+#include <linux/rcupdate.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/sched.h>
+#include <linux/types.h>
+#include <linux/init.h>
#include <linux/time.h>
+#include <linux/cpu.h>
/* Global control variables for rcupdate callback mechanism. */
struct rcu_ctrlblk {
@@ -46,14 +45,13 @@ struct rcu_ctrlblk {
/* Definition for rcupdate control block. */
static struct rcu_ctrlblk rcu_ctrlblk = {
- .rcucblist = NULL,
- .donetail = &rcu_ctrlblk.rcucblist,
- .curtail = &rcu_ctrlblk.rcucblist,
+ .donetail = &rcu_ctrlblk.rcucblist,
+ .curtail = &rcu_ctrlblk.rcucblist,
};
+
static struct rcu_ctrlblk rcu_bh_ctrlblk = {
- .rcucblist = NULL,
- .donetail = &rcu_bh_ctrlblk.rcucblist,
- .curtail = &rcu_bh_ctrlblk.rcucblist,
+ .donetail = &rcu_bh_ctrlblk.rcucblist,
+ .curtail = &rcu_bh_ctrlblk.rcucblist,
};
#ifdef CONFIG_NO_HZ
@@ -84,8 +82,8 @@ void rcu_exit_nohz(void)
/*
* Helper function for rcu_qsctr_inc() and rcu_bh_qsctr_inc().
- * Also disable irqs to avoid confusion due to interrupt handlers invoking
- * call_rcu().
+ * Also disable irqs to avoid confusion due to interrupt handlers
+ * invoking call_rcu().
*/
static int rcu_qsctr_help(struct rcu_ctrlblk *rcp)
{
@@ -99,6 +97,7 @@ static int rcu_qsctr_help(struct rcu_ctrlblk *rcp)
return 1;
}
local_irq_restore(flags);
+
return 0;
}
@@ -143,8 +142,8 @@ void rcu_check_callbacks(int cpu, int user)
*/
static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
{
- unsigned long flags;
struct rcu_head *next, *list;
+ unsigned long flags;
/* If no RCU callbacks ready to invoke, just return. */
if (&rcp->rcucblist == rcp->donetail)
@@ -182,8 +181,7 @@ static void rcu_process_callbacks(struct softirq_action *unused)
* Null function to handle CPU being onlined. Longer term, we want to
* make TINY_RCU avoid using rcupdate.c, but later...
*/
-int rcu_cpu_notify(struct notifier_block *self,
- unsigned long action, void *hcpu)
+int rcu_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu)
{
return NOTIFY_OK;
}
@@ -223,6 +221,7 @@ static void __call_rcu(struct rcu_head *head,
head->func = func;
head->next = NULL;
+
local_irq_save(flags);
*rcp->curtail = head;
rcp->curtail = &head->next;
@@ -234,8 +233,7 @@ static void __call_rcu(struct rcu_head *head,
* period. But since we have but one CPU, that would be after any
* quiescent state.
*/
-void call_rcu(struct rcu_head *head,
- void (*func)(struct rcu_head *rcu))
+void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
{
__call_rcu(head, func, &rcu_ctrlblk);
}
@@ -245,8 +243,7 @@ EXPORT_SYMBOL_GPL(call_rcu);
* Post an RCU bottom-half callback to be invoked after any subsequent
* quiescent state.
*/
-void call_rcu_bh(struct rcu_head *head,
- void (*func)(struct rcu_head *rcu))
+void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
{
__call_rcu(head, func, &rcu_bh_ctrlblk);
}
next prev parent reply other threads:[~2009-10-26 11:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 2:02 [PATCH tip/core/rcu 0/6] rcu: Tiny RCU, expedited RCU, rcutorture fixes, lockdep simplification Paul E. McKenney
2009-10-26 2:03 ` [PATCH tip/core/rcu 1/6] rcu: The Bloatwatch Edition, v8 Paul E. McKenney
2009-10-26 11:36 ` [tip:core/rcu] rcu: "Tiny RCU", The Bloatwatch Edition tip-bot for Paul E. McKenney
2009-10-26 11:37 ` tip-bot for Ingo Molnar [this message]
2009-10-26 16:29 ` [tip:core/rcu] rcu: Do tiny cleanups in rcutiny Paul E. McKenney
2009-10-26 2:03 ` [PATCH tip/core/rcu 2/6] rcu: Add synchronize_srcu_expedited() Paul E. McKenney
2009-10-26 11:36 ` [tip:core/rcu] " tip-bot for Paul E. McKenney
2009-10-26 2:03 ` [PATCH tip/core/rcu 3/6] rcu: add synchronize_srcu_expedited() to the rcutorture test suite Paul E. McKenney
2009-10-26 11:37 ` [tip:core/rcu] rcu: Add " tip-bot for Paul E. McKenney
2009-10-26 2:03 ` [PATCH tip/core/rcu 4/6] rcu: add synchronize_srcu_expedited() to the documentation Paul E. McKenney
2009-10-26 11:37 ` [tip:core/rcu] rcu: Add " tip-bot for Paul E. McKenney
2009-10-26 2:03 ` [PATCH tip/core/rcu 5/6] rcu: Improve rcutorture diagnostics when bad torture_type specified Paul E. McKenney
2009-10-26 11:37 ` [tip:core/rcu] " tip-bot for Paul E. McKenney
2009-10-26 2:03 ` [PATCH tip/core/rcu 6/6] rcu: Simplify creating of lockdep class for root rcu_node Paul E. McKenney
2009-10-26 6:50 ` Ingo Molnar
2009-10-26 17:13 ` Paul E. McKenney
2009-10-26 8:34 ` Lai Jiangshan
2009-10-26 17:12 ` Paul E. McKenney
2009-10-26 2:27 ` [PATCH tip/core/rcu 0/6] rcu: Tiny RCU, expedited RCU, rcutorture fixes, lockdep simplification Josh Triplett
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=tip-4ce5b90340879ce93d169b7b523c2cbbe7c45843@git.kernel.org \
--to=mingo@elte.hu \
--cc=dhowells@redhat.com \
--cc=hpa@zytor.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox