aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcu/rcu.h17
-rw-r--r--kernel/rcu/update.c1
2 files changed, 18 insertions, 0 deletions
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index b8729eb09a5d..59c471de342a 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -203,6 +203,21 @@ static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head)
203extern int rcu_cpu_stall_suppress; 203extern int rcu_cpu_stall_suppress;
204int rcu_jiffies_till_stall_check(void); 204int rcu_jiffies_till_stall_check(void);
205 205
206#define rcu_ftrace_dump_stall_suppress() \
207do { \
208 if (!rcu_cpu_stall_suppress) \
209 rcu_cpu_stall_suppress = 3; \
210} while (0)
211
212#define rcu_ftrace_dump_stall_unsuppress() \
213do { \
214 if (rcu_cpu_stall_suppress == 3) \
215 rcu_cpu_stall_suppress = 0; \
216} while (0)
217
218#else /* #endif #ifdef CONFIG_RCU_STALL_COMMON */
219#define rcu_ftrace_dump_stall_suppress()
220#define rcu_ftrace_dump_stall_unsuppress()
206#endif /* #ifdef CONFIG_RCU_STALL_COMMON */ 221#endif /* #ifdef CONFIG_RCU_STALL_COMMON */
207 222
208/* 223/*
@@ -222,7 +237,9 @@ do { \
222 if (!atomic_read(&___rfd_beenhere) && \ 237 if (!atomic_read(&___rfd_beenhere) && \
223 !atomic_xchg(&___rfd_beenhere, 1)) { \ 238 !atomic_xchg(&___rfd_beenhere, 1)) { \
224 tracing_off(); \ 239 tracing_off(); \
240 rcu_ftrace_dump_stall_suppress(); \
225 ftrace_dump(oops_dump_mode); \ 241 ftrace_dump(oops_dump_mode); \
242 rcu_ftrace_dump_stall_unsuppress(); \
226 } \ 243 } \
227} while (0) 244} while (0)
228 245
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 5033b66d2753..3dc8efb16dc7 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -494,6 +494,7 @@ EXPORT_SYMBOL_GPL(do_trace_rcu_torture_read);
494#endif 494#endif
495 495
496int rcu_cpu_stall_suppress __read_mostly; /* 1 = suppress stall warnings. */ 496int rcu_cpu_stall_suppress __read_mostly; /* 1 = suppress stall warnings. */
497EXPORT_SYMBOL_GPL(rcu_cpu_stall_suppress);
497static int rcu_cpu_stall_timeout __read_mostly = CONFIG_RCU_CPU_STALL_TIMEOUT; 498static int rcu_cpu_stall_timeout __read_mostly = CONFIG_RCU_CPU_STALL_TIMEOUT;
498 499
499module_param(rcu_cpu_stall_suppress, int, 0644); 500module_param(rcu_cpu_stall_suppress, int, 0644);