aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tiny.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-05-17 13:54:29 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-06-08 21:52:45 -0400
commit6d48152eafde1f0d0a4a9e0584fa7d9ff4fbfdac (patch)
treea4e249fef970885c4a96b2251505ab81f3abf25b /kernel/rcu/tiny.c
parentc23484f0e7bc89e1facb04103ce24efeebee76b9 (diff)
rcu: Remove RCU CPU stall warnings from Tiny RCU
Tiny RCU's job is to be tiny, so this commit removes its RCU CPU stall warning code. After this, there is no longer any need for rcu_sched_ctrlblk and rcu_bh_ctrlblk to be in tiny_plugin.h, so this commit also moves them to tiny.c. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tiny.c')
-rw-r--r--kernel/rcu/tiny.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
index 595cb1bf944f..f8488965250f 100644
--- a/kernel/rcu/tiny.c
+++ b/kernel/rcu/tiny.c
@@ -38,11 +38,23 @@
38 38
39#include "rcu.h" 39#include "rcu.h"
40 40
41/* Forward declarations for tiny_plugin.h. */ 41/* Global control variables for rcupdate callback mechanism. */
42struct rcu_ctrlblk; 42struct rcu_ctrlblk {
43static void __call_rcu(struct rcu_head *head, 43 struct rcu_head *rcucblist; /* List of pending callbacks (CBs). */
44 rcu_callback_t func, 44 struct rcu_head **donetail; /* ->next pointer of last "done" CB. */
45 struct rcu_ctrlblk *rcp); 45 struct rcu_head **curtail; /* ->next pointer of last CB. */
46};
47
48/* Definition for rcupdate control block. */
49static struct rcu_ctrlblk rcu_sched_ctrlblk = {
50 .donetail = &rcu_sched_ctrlblk.rcucblist,
51 .curtail = &rcu_sched_ctrlblk.rcucblist,
52};
53
54static struct rcu_ctrlblk rcu_bh_ctrlblk = {
55 .donetail = &rcu_bh_ctrlblk.rcucblist,
56 .curtail = &rcu_bh_ctrlblk.rcucblist,
57};
46 58
47#include "tiny_plugin.h" 59#include "tiny_plugin.h"
48 60
@@ -65,7 +77,6 @@ EXPORT_SYMBOL(rcu_barrier_sched);
65 */ 77 */
66static int rcu_qsctr_help(struct rcu_ctrlblk *rcp) 78static int rcu_qsctr_help(struct rcu_ctrlblk *rcp)
67{ 79{
68 RCU_TRACE(reset_cpu_stall_ticks(rcp);)
69 if (rcp->donetail != rcp->curtail) { 80 if (rcp->donetail != rcp->curtail) {
70 rcp->donetail = rcp->curtail; 81 rcp->donetail = rcp->curtail;
71 return 1; 82 return 1;
@@ -111,7 +122,6 @@ void rcu_bh_qs(void)
111 */ 122 */
112void rcu_check_callbacks(int user) 123void rcu_check_callbacks(int user)
113{ 124{
114 RCU_TRACE(check_cpu_stalls();)
115 if (user) 125 if (user)
116 rcu_sched_qs(); 126 rcu_sched_qs();
117 else if (!in_softirq()) 127 else if (!in_softirq())
@@ -126,10 +136,8 @@ void rcu_check_callbacks(int user)
126 */ 136 */
127static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp) 137static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
128{ 138{
129 const char *rn = NULL;
130 struct rcu_head *next, *list; 139 struct rcu_head *next, *list;
131 unsigned long flags; 140 unsigned long flags;
132 RCU_TRACE(int cb_count = 0;)
133 141
134 /* Move the ready-to-invoke callbacks to a local list. */ 142 /* Move the ready-to-invoke callbacks to a local list. */
135 local_irq_save(flags); 143 local_irq_save(flags);
@@ -147,18 +155,15 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
147 local_irq_restore(flags); 155 local_irq_restore(flags);
148 156
149 /* Invoke the callbacks on the local list. */ 157 /* Invoke the callbacks on the local list. */
150 RCU_TRACE(rn = rcp->name;)
151 while (list) { 158 while (list) {
152 next = list->next; 159 next = list->next;
153 prefetch(next); 160 prefetch(next);
154 debug_rcu_head_unqueue(list); 161 debug_rcu_head_unqueue(list);
155 local_bh_disable(); 162 local_bh_disable();
156 __rcu_reclaim(rn, list); 163 __rcu_reclaim("", list);
157 local_bh_enable(); 164 local_bh_enable();
158 list = next; 165 list = next;
159 RCU_TRACE(cb_count++;)
160 } 166 }
161 RCU_TRACE(rcu_trace_sub_qlen(rcp, cb_count);)
162} 167}
163 168
164static __latent_entropy void rcu_process_callbacks(struct softirq_action *unused) 169static __latent_entropy void rcu_process_callbacks(struct softirq_action *unused)
@@ -202,7 +207,6 @@ static void __call_rcu(struct rcu_head *head,
202 local_irq_save(flags); 207 local_irq_save(flags);
203 *rcp->curtail = head; 208 *rcp->curtail = head;
204 rcp->curtail = &head->next; 209 rcp->curtail = &head->next;
205 RCU_TRACE(rcp->qlen++;)
206 local_irq_restore(flags); 210 local_irq_restore(flags);
207 211
208 if (unlikely(is_idle_task(current))) { 212 if (unlikely(is_idle_task(current))) {
@@ -235,8 +239,5 @@ EXPORT_SYMBOL_GPL(call_rcu_bh);
235void __init rcu_init(void) 239void __init rcu_init(void)
236{ 240{
237 open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); 241 open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);
238 RCU_TRACE(reset_cpu_stall_ticks(&rcu_sched_ctrlblk);)
239 RCU_TRACE(reset_cpu_stall_ticks(&rcu_bh_ctrlblk);)
240
241 rcu_early_boot_tests(); 242 rcu_early_boot_tests();
242} 243}