Skip to content

Commit

Permalink
SUNRPC: Add trace_rpc_timeout_status()
Browse files Browse the repository at this point in the history
For a long while we've wanted a tracepoint that fires when a major
timeout is reported in the system log. Such a tracepoint can be
attached to other actions that can take place when a timeout is
detected (eg, server or connection health assessment).

Signed-off-by: Chuck Lever <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
chucklever authored and amschuma-ntap committed Sep 21, 2020
1 parent 6f9f172 commit 914cdcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/trace/events/sunrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ DECLARE_EVENT_CLASS(rpc_task_status,
DEFINE_RPC_STATUS_EVENT(call);
DEFINE_RPC_STATUS_EVENT(bind);
DEFINE_RPC_STATUS_EVENT(connect);
DEFINE_RPC_STATUS_EVENT(timeout);

TRACE_EVENT(rpc_request,
TP_PROTO(const struct rpc_task *task),
Expand Down
2 changes: 1 addition & 1 deletion net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,7 @@ rpc_check_timeout(struct rpc_task *task)
if (xprt_adjust_timeout(task->tk_rqstp) == 0)
return;

dprintk("RPC: %5u call_timeout (major)\n", task->tk_pid);
trace_rpc_timeout_status(task);
task->tk_timeouts++;

if (RPC_IS_SOFTCONN(task) && !rpc_check_connected(task->tk_rqstp)) {
Expand Down

0 comments on commit 914cdcc

Please sign in to comment.