]> git.baikalelectronics.ru Git - kernel.git/commitdiff
SUNRPC: Capture signalled RPC tasks
authorChuck Lever <chuck.lever@oracle.com>
Mon, 23 Dec 2019 15:28:28 +0000 (10:28 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:54:31 +0000 (10:54 -0500)
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 8c73ffb5f7fd19b2103f467c713a598c7434ff8d..ee993575d2fad63a2e87357863512eb2febc6009 100644 (file)
@@ -185,6 +185,7 @@ DECLARE_EVENT_CLASS(rpc_task_running,
 DEFINE_RPC_RUNNING_EVENT(begin);
 DEFINE_RPC_RUNNING_EVENT(run_action);
 DEFINE_RPC_RUNNING_EVENT(complete);
+DEFINE_RPC_RUNNING_EVENT(signalled);
 DEFINE_RPC_RUNNING_EVENT(end);
 
 DECLARE_EVENT_CLASS(rpc_task_queued,
index 9c79548c684746397cd063210457ad37f06a3a43..55e900255b0c27c77df116accb12e82cf11d7c84 100644 (file)
@@ -846,6 +846,8 @@ void rpc_signal_task(struct rpc_task *task)
 
        if (!RPC_IS_ACTIVATED(task))
                return;
+
+       trace_rpc_task_signalled(task, task->tk_action);
        set_bit(RPC_TASK_SIGNALLED, &task->tk_runstate);
        smp_mb__after_atomic();
        queue = READ_ONCE(task->tk_waitqueue);
@@ -949,7 +951,7 @@ static void __rpc_execute(struct rpc_task *task)
                         * clean up after sleeping on some queue, we don't
                         * break the loop here, but go around once more.
                         */
-                       dprintk("RPC: %5u got signal\n", task->tk_pid);
+                       trace_rpc_task_signalled(task, task->tk_action);
                        set_bit(RPC_TASK_SIGNALLED, &task->tk_runstate);
                        task->tk_rpc_status = -ERESTARTSYS;
                        rpc_exit(task, -ERESTARTSYS);