mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 08:34:20 +08:00
SUNRPC: Add trace_rpc_timeout_status()
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 <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
6f9f17287e
commit
914cdcc78a
@ -261,6 +261,7 @@ DECLARE_EVENT_CLASS(rpc_task_status,
|
|||||||
DEFINE_RPC_STATUS_EVENT(call);
|
DEFINE_RPC_STATUS_EVENT(call);
|
||||||
DEFINE_RPC_STATUS_EVENT(bind);
|
DEFINE_RPC_STATUS_EVENT(bind);
|
||||||
DEFINE_RPC_STATUS_EVENT(connect);
|
DEFINE_RPC_STATUS_EVENT(connect);
|
||||||
|
DEFINE_RPC_STATUS_EVENT(timeout);
|
||||||
|
|
||||||
TRACE_EVENT(rpc_request,
|
TRACE_EVENT(rpc_request,
|
||||||
TP_PROTO(const struct rpc_task *task),
|
TP_PROTO(const struct rpc_task *task),
|
||||||
|
@ -2398,7 +2398,7 @@ rpc_check_timeout(struct rpc_task *task)
|
|||||||
if (xprt_adjust_timeout(task->tk_rqstp) == 0)
|
if (xprt_adjust_timeout(task->tk_rqstp) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dprintk("RPC: %5u call_timeout (major)\n", task->tk_pid);
|
trace_rpc_timeout_status(task);
|
||||||
task->tk_timeouts++;
|
task->tk_timeouts++;
|
||||||
|
|
||||||
if (RPC_IS_SOFTCONN(task) && !rpc_check_connected(task->tk_rqstp)) {
|
if (RPC_IS_SOFTCONN(task) && !rpc_check_connected(task->tk_rqstp)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user