aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2009-09-28 10:46:32 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-05 15:02:02 -0400
commit3d76c082907e8f83c5d5c4572f38d53ad8f00c4b (patch)
treea39c3d3ea17dc085195626487f37995beb742ac0
parent162cc2794df37662beb7f97ddd1dd5bffaf85e9a (diff)
rcu: Clean up code based on review feedback from Josh Triplett, part 3
Whitespace fixes, updated comments, and trivial code movement. o Fix whitespace error in RCU_HEAD_INIT() o Move "So where is rcu_write_lock()" comment so that it does not come between the rcu_read_unlock() header comment and the rcu_read_unlock() definition. o Move the module_param statements for blimit, qhimark, and qlowmark to immediately follow the corresponding definitions. o In __rcu_offline_cpu(), move the assignment to rdp_me inside the "if" statement, given that rdp_me is not used outside of that "if" statement. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: akpm@linux-foundation.org Cc: mathieu.desnoyers@polymtl.ca Cc: josh@joshtriplett.org Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: Valdis.Kletnieks@vt.edu Cc: dhowells@redhat.com LKML-Reference: <12541491931164-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/linux/rcupdate.h14
-rw-r--r--kernel/rcutree.c10
2 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 70331218e4b4..3ebd0b7bcb08 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -77,7 +77,7 @@ extern int rcu_scheduler_active;
77#error "Unknown RCU implementation specified to kernel configuration" 77#error "Unknown RCU implementation specified to kernel configuration"
78#endif 78#endif
79 79
80#define RCU_HEAD_INIT { .next = NULL, .func = NULL } 80#define RCU_HEAD_INIT { .next = NULL, .func = NULL }
81#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT 81#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT
82#define INIT_RCU_HEAD(ptr) do { \ 82#define INIT_RCU_HEAD(ptr) do { \
83 (ptr)->next = NULL; (ptr)->func = NULL; \ 83 (ptr)->next = NULL; (ptr)->func = NULL; \
@@ -129,12 +129,6 @@ static inline void rcu_read_lock(void)
129 rcu_read_acquire(); 129 rcu_read_acquire();
130} 130}
131 131
132/**
133 * rcu_read_unlock - marks the end of an RCU read-side critical section.
134 *
135 * See rcu_read_lock() for more information.
136 */
137
138/* 132/*
139 * So where is rcu_write_lock()? It does not exist, as there is no 133 * So where is rcu_write_lock()? It does not exist, as there is no
140 * way for writers to lock out RCU readers. This is a feature, not 134 * way for writers to lock out RCU readers. This is a feature, not
@@ -144,6 +138,12 @@ static inline void rcu_read_lock(void)
144 * used as well. RCU does not care how the writers keep out of each 138 * used as well. RCU does not care how the writers keep out of each
145 * others' way, as long as they do so. 139 * others' way, as long as they do so.
146 */ 140 */
141
142/**
143 * rcu_read_unlock - marks the end of an RCU read-side critical section.
144 *
145 * See rcu_read_lock() for more information.
146 */
147static inline void rcu_read_unlock(void) 147static inline void rcu_read_unlock(void)
148{ 148{
149 rcu_read_release(); 149 rcu_read_release();
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 81af59b8dd88..d5597830faf5 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -122,6 +122,10 @@ static int blimit = 10; /* Maximum callbacks per softirq. */
122static int qhimark = 10000; /* If this many pending, ignore blimit. */ 122static int qhimark = 10000; /* If this many pending, ignore blimit. */
123static int qlowmark = 100; /* Once only this many pending, use blimit. */ 123static int qlowmark = 100; /* Once only this many pending, use blimit. */
124 124
125module_param(blimit, int, 0);
126module_param(qhimark, int, 0);
127module_param(qlowmark, int, 0);
128
125static void force_quiescent_state(struct rcu_state *rsp, int relaxed); 129static void force_quiescent_state(struct rcu_state *rsp, int relaxed);
126static int rcu_pending(int cpu); 130static int rcu_pending(int cpu);
127 131
@@ -878,8 +882,8 @@ static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp)
878 * indefinitely delay callbacks, you have far worse things to 882 * indefinitely delay callbacks, you have far worse things to
879 * be worrying about. 883 * be worrying about.
880 */ 884 */
881 rdp_me = rsp->rda[smp_processor_id()];
882 if (rdp->nxtlist != NULL) { 885 if (rdp->nxtlist != NULL) {
886 rdp_me = rsp->rda[smp_processor_id()];
883 *rdp_me->nxttail[RCU_NEXT_TAIL] = rdp->nxtlist; 887 *rdp_me->nxttail[RCU_NEXT_TAIL] = rdp->nxtlist;
884 rdp_me->nxttail[RCU_NEXT_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; 888 rdp_me->nxttail[RCU_NEXT_TAIL] = rdp->nxttail[RCU_NEXT_TAIL];
885 rdp->nxtlist = NULL; 889 rdp->nxtlist = NULL;
@@ -1575,7 +1579,3 @@ void __init __rcu_init(void)
1575} 1579}
1576 1580
1577#include "rcutree_plugin.h" 1581#include "rcutree_plugin.h"
1578
1579module_param(blimit, int, 0);
1580module_param(qhimark, int, 0);
1581module_param(qlowmark, int, 0);