SUNRPC: Clean up RPC scheduler tracepoints
authorChuck Lever <chuck.lever@oracle.com>
Wed, 8 Jul 2020 20:10:45 +0000 (16:10 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 21 Sep 2020 14:21:09 +0000 (10:21 -0400)
Remove several redundant dprintk call sites, and replace a couple of
potentially useful ones with tracepoints.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/trace/events/sunrpc.h
net/sunrpc/sched.c

index b5d4cbb..11e5e52 100644 (file)
@@ -387,6 +387,8 @@ DECLARE_EVENT_CLASS(rpc_task_running,
 
 DEFINE_RPC_RUNNING_EVENT(begin);
 DEFINE_RPC_RUNNING_EVENT(run_action);
+DEFINE_RPC_RUNNING_EVENT(sync_sleep);
+DEFINE_RPC_RUNNING_EVENT(sync_wake);
 DEFINE_RPC_RUNNING_EVENT(complete);
 DEFINE_RPC_RUNNING_EVENT(signalled);
 DEFINE_RPC_RUNNING_EVENT(end);
index 402b1c8..a0d5a98 100644 (file)
@@ -885,9 +885,6 @@ static void __rpc_execute(struct rpc_task *task)
        int task_is_async = RPC_IS_ASYNC(task);
        int status = 0;
 
-       dprintk("RPC: %5u __rpc_execute flags=0x%x\n",
-                       task->tk_pid, task->tk_flags);
-
        WARN_ON_ONCE(RPC_IS_QUEUED(task));
        if (RPC_IS_QUEUED(task))
                return;
@@ -947,7 +944,7 @@ static void __rpc_execute(struct rpc_task *task)
                        return;
 
                /* sync task: sleep here */
-               dprintk("RPC: %5u sync task going to sleep\n", task->tk_pid);
+               trace_rpc_task_sync_sleep(task, task->tk_action);
                status = out_of_line_wait_on_bit(&task->tk_runstate,
                                RPC_TASK_QUEUED, rpc_wait_bit_killable,
                                TASK_KILLABLE);
@@ -963,11 +960,9 @@ static void __rpc_execute(struct rpc_task *task)
                        task->tk_rpc_status = -ERESTARTSYS;
                        rpc_exit(task, -ERESTARTSYS);
                }
-               dprintk("RPC: %5u sync task resuming\n", task->tk_pid);
+               trace_rpc_task_sync_wake(task, task->tk_action);
        }
 
-       dprintk("RPC: %5u return %d, status %d\n", task->tk_pid, status,
-                       task->tk_status);
        /* Release all resources associated with the task */
        rpc_release_task(task);
 }
@@ -1146,10 +1141,8 @@ static void rpc_free_task(struct rpc_task *task)
        put_rpccred(task->tk_op_cred);
        rpc_release_calldata(task->tk_ops, task->tk_calldata);
 
-       if (tk_flags & RPC_TASK_DYNAMIC) {
-               dprintk("RPC: %5u freeing task\n", task->tk_pid);
+       if (tk_flags & RPC_TASK_DYNAMIC)
                mempool_free(task, rpc_task_mempool);
-       }
 }
 
 static void rpc_async_release(struct work_struct *work)
@@ -1203,8 +1196,6 @@ EXPORT_SYMBOL_GPL(rpc_put_task_async);
 
 static void rpc_release_task(struct rpc_task *task)
 {
-       dprintk("RPC: %5u release task\n", task->tk_pid);
-
        WARN_ON_ONCE(RPC_IS_QUEUED(task));
 
        rpc_release_resources_task(task);