]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rcutorture: Print message before invoking ->cb_barrier()
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 6 Dec 2021 23:12:14 +0000 (15:12 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 2 Feb 2022 01:24:38 +0000 (17:24 -0800)
The various ->cb_barrier() functions, for example, rcu_barrier(),
sometimes cause rcutorture hangs.  But currently, the last console
message is the unenlightening "Stopping rcu_torture_stats".  This commit
therefore prints a message of the form "rcu_torture_cleanup: Invoking
rcu_barrier+0x0/0x1e0()" to help point people in the right direction.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c

index 422f7e4cc08de898f711b5e82e331f10aafd6cad..00400aef58184396b9cc68b924050b87a6496081 100644 (file)
@@ -2905,8 +2905,10 @@ rcu_torture_cleanup(void)
        int i;
 
        if (torture_cleanup_begin()) {
-               if (cur_ops->cb_barrier != NULL)
+               if (cur_ops->cb_barrier != NULL) {
+                       pr_info("%s: Invoking %pS().\n", __func__, cur_ops->cb_barrier);
                        cur_ops->cb_barrier();
+               }
                return;
        }
        if (!cur_ops) {
@@ -2961,8 +2963,10 @@ rcu_torture_cleanup(void)
         * Wait for all RCU callbacks to fire, then do torture-type-specific
         * cleanup operations.
         */
-       if (cur_ops->cb_barrier != NULL)
+       if (cur_ops->cb_barrier != NULL) {
+               pr_info("%s: Invoking %pS().\n", __func__, cur_ops->cb_barrier);
                cur_ops->cb_barrier();
+       }
        if (cur_ops->cleanup != NULL)
                cur_ops->cleanup();