aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree_stall.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcu/tree_stall.h')
-rw-r--r--kernel/rcu/tree_stall.h36
1 files changed, 7 insertions, 29 deletions
diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
index e0e73f493363..b476786b8ef7 100644
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
@@ -95,30 +95,6 @@ static void rcu_print_detail_task_stall_rnp(struct rcu_node *rnp)
95} 95}
96 96
97/* 97/*
98 * Dump detailed information for all tasks blocking the current RCU
99 * grace period.
100 */
101static void rcu_print_detail_task_stall(void)
102{
103 struct rcu_node *rnp = rcu_get_root();
104
105 rcu_print_detail_task_stall_rnp(rnp);
106 rcu_for_each_leaf_node(rnp)
107 rcu_print_detail_task_stall_rnp(rnp);
108}
109
110static void rcu_print_task_stall_begin(struct rcu_node *rnp)
111{
112 pr_err("\tTasks blocked on level-%d rcu_node (CPUs %d-%d):",
113 rnp->level, rnp->grplo, rnp->grphi);
114}
115
116static void rcu_print_task_stall_end(void)
117{
118 pr_cont("\n");
119}
120
121/*
122 * Scan the current list of tasks blocked within RCU read-side critical 98 * Scan the current list of tasks blocked within RCU read-side critical
123 * sections, printing out the tid of each. 99 * sections, printing out the tid of each.
124 */ 100 */
@@ -129,14 +105,15 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
129 105
130 if (!rcu_preempt_blocked_readers_cgp(rnp)) 106 if (!rcu_preempt_blocked_readers_cgp(rnp))
131 return 0; 107 return 0;
132 rcu_print_task_stall_begin(rnp); 108 pr_err("\tTasks blocked on level-%d rcu_node (CPUs %d-%d):",
109 rnp->level, rnp->grplo, rnp->grphi);
133 t = list_entry(rnp->gp_tasks->prev, 110 t = list_entry(rnp->gp_tasks->prev,
134 struct task_struct, rcu_node_entry); 111 struct task_struct, rcu_node_entry);
135 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) { 112 list_for_each_entry_continue(t, &rnp->blkd_tasks, rcu_node_entry) {
136 pr_cont(" P%d", t->pid); 113 pr_cont(" P%d", t->pid);
137 ndetected++; 114 ndetected++;
138 } 115 }
139 rcu_print_task_stall_end(); 116 pr_cont("\n");
140 return ndetected; 117 return ndetected;
141} 118}
142 119
@@ -146,7 +123,7 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
146 * Because preemptible RCU does not exist, we never have to check for 123 * Because preemptible RCU does not exist, we never have to check for
147 * tasks blocked within RCU read-side critical sections. 124 * tasks blocked within RCU read-side critical sections.
148 */ 125 */
149static void rcu_print_detail_task_stall(void) 126static void rcu_print_detail_task_stall_rnp(struct rcu_node *rnp)
150{ 127{
151} 128}
152 129
@@ -253,7 +230,7 @@ static void print_other_cpu_stall(unsigned long gp_seq)
253 unsigned long gpa; 230 unsigned long gpa;
254 unsigned long j; 231 unsigned long j;
255 int ndetected = 0; 232 int ndetected = 0;
256 struct rcu_node *rnp = rcu_get_root(); 233 struct rcu_node *rnp;
257 long totqlen = 0; 234 long totqlen = 0;
258 235
259 /* Kick and suppress, if so configured. */ 236 /* Kick and suppress, if so configured. */
@@ -291,7 +268,8 @@ static void print_other_cpu_stall(unsigned long gp_seq)
291 rcu_dump_cpu_stacks(); 268 rcu_dump_cpu_stacks();
292 269
293 /* Complain about tasks blocking the grace period. */ 270 /* Complain about tasks blocking the grace period. */
294 rcu_print_detail_task_stall(); 271 rcu_for_each_leaf_node(rnp)
272 rcu_print_detail_task_stall_rnp(rnp);
295 } else { 273 } else {
296 if (rcu_seq_current(&rcu_state.gp_seq) != gp_seq) { 274 if (rcu_seq_current(&rcu_state.gp_seq) != gp_seq) {
297 pr_err("INFO: Stall ended before state dump start\n"); 275 pr_err("INFO: Stall ended before state dump start\n");