rcutorture: Add task's CPU for rcutorture writer stalls
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 19 Jun 2017 17:03:22 +0000 (10:03 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 24 Jul 2017 23:04:17 +0000 (16:04 -0700)
It appears that at least some of the rcutorture writer stall messages
coincide with unusually long CPU-online operations, for example, no
fewer than 205 seconds in a recent test.  It is of course possible that
the writer stall is not unrelated to this unusually long CPU-hotplug
operation, and so this commit adds the rcutorture writer task's CPU to
the stall message to gain more information about this possible connection.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/rcutorture.c

index b48d210..75ac749 100644 (file)
@@ -1319,11 +1319,12 @@ rcu_torture_stats_print(void)
                srcutorture_get_gp_data(cur_ops->ttype, srcu_ctlp,
                                        &flags, &gpnum, &completed);
                wtp = READ_ONCE(writer_task);
-               pr_alert("??? Writer stall state %s(%d) g%lu c%lu f%#x ->state %#lx\n",
+               pr_alert("??? Writer stall state %s(%d) g%lu c%lu f%#x ->state %#lx cpu %d\n",
                         rcu_torture_writer_state_getname(),
                         rcu_torture_writer_state,
                         gpnum, completed, flags,
-                        wtp == NULL ? ~0UL : wtp->state);
+                        wtp == NULL ? ~0UL : wtp->state,
+                        wtp == NULL ? -1 : (int)task_cpu(wtp));
                show_rcu_gp_kthreads();
                rcu_ftrace_dump(DUMP_ALL);
        }