Time to remove dprintk call sites in here. Regarding the rpc_bind_status tracepoint: It's friendlier to administrators if they don't have to look up the error code to figure out what went wrong. Replace trace_rpc_bind_status with a set of tracepoints that report more specifically what the problem was, and what RPC program/version was being queried.
Unified · Split
| @@ -259,7 +259,6 @@ DECLARE_EVENT_CLASS(rpc_task_status, · 258 unmodified lines | |||
| 259 | TP_ARGS(task)) | 259 | TP_ARGS(task)) |
| 260 | 260 | ||
| 261 | DEFINE_RPC_STATUS_EVENT(call); | 261 | DEFINE_RPC_STATUS_EVENT(call); |
| 262 | DEFINE_RPC_STATUS_EVENT(bind); | ||
| 263 | DEFINE_RPC_STATUS_EVENT(connect); | 262 | DEFINE_RPC_STATUS_EVENT(connect); |
| 264 | DEFINE_RPC_STATUS_EVENT(timeout); | 263 | DEFINE_RPC_STATUS_EVENT(timeout); |
| 265 | DEFINE_RPC_STATUS_EVENT(retry_refresh); | 264 | DEFINE_RPC_STATUS_EVENT(retry_refresh); |
| @@ -520,6 +519,19 @@ DEFINE_RPC_REPLY_EVENT(stale_creds); · 254 unmodified lines | |||
| 520 | DEFINE_RPC_REPLY_EVENT(bad_creds); | 519 | DEFINE_RPC_REPLY_EVENT(bad_creds); |
| 521 | DEFINE_RPC_REPLY_EVENT(auth_tooweak); | 520 | DEFINE_RPC_REPLY_EVENT(auth_tooweak); |
| 522 | 521 | ||
| 522 | #define DEFINE_RPCB_ERROR_EVENT(name) \ | ||
| 523 | DEFINE_EVENT(rpc_reply_event, rpcb_##name##_err, \ | ||
| 524 | TP_PROTO( \ | ||
| 525 | const struct rpc_task *task \ | ||
| 526 | ), \ | ||
| 527 | TP_ARGS(task)) | ||
| 528 | |||
| 529 | DEFINE_RPCB_ERROR_EVENT(prog_unavail); | ||
| 530 | DEFINE_RPCB_ERROR_EVENT(timeout); | ||
| 531 | DEFINE_RPCB_ERROR_EVENT(bind_version); | ||
| 532 | DEFINE_RPCB_ERROR_EVENT(unreachable); | ||
| 533 | DEFINE_RPCB_ERROR_EVENT(unrecognized); | ||
| 534 | |||
| 523 | TRACE_EVENT(rpc_buf_alloc, | 535 | TRACE_EVENT(rpc_buf_alloc, |
| 524 | TP_PROTO( | 536 | TP_PROTO( |
| 525 | const struct rpc_task *task, | 537 | const struct rpc_task *task, |
| @@ -1957,7 +1957,6 @@ call_bind_status(struct rpc_task *task) · 1956 unmodified lines | |||
| 1957 | return; | 1957 | return; |
| 1958 | } | 1958 | } |
| 1959 | 1959 | ||
| 1960 | trace_rpc_bind_status(task); | ||
| 1961 | if (task->tk_status >= 0) | 1960 | if (task->tk_status >= 0) |
| 1962 | goto out_next; | 1961 | goto out_next; |
| 1963 | if (xprt_bound(xprt)) { | 1962 | if (xprt_bound(xprt)) { |
| @@ -1967,12 +1966,10 @@ call_bind_status(struct rpc_task *task) · 3 unmodified lines | |||
| 1967 | 1966 | ||
| 1968 | switch (task->tk_status) { | 1967 | switch (task->tk_status) { |
| 1969 | case -ENOMEM: | 1968 | case -ENOMEM: |
| 1970 | dprintk("RPC: %5u rpcbind out of memory\n", task->tk_pid); | ||
| 1971 | rpc_delay(task, HZ >> 2); | 1969 | rpc_delay(task, HZ >> 2); |
| 1972 | goto retry_timeout; | 1970 | goto retry_timeout; |
| 1973 | case -EACCES: | 1971 | case -EACCES: |
| 1974 | dprintk("RPC: %5u remote rpcbind: RPC program/version " | 1972 | trace_rpcb_prog_unavail_err(task); |
| 1975 | "unavailable\n", task->tk_pid); | ||
| 1976 | /* fail immediately if this is an RPC ping */ | 1973 | /* fail immediately if this is an RPC ping */ |
| 1977 | if (task->tk_msg.rpc_proc->p_proc == 0) { | 1974 | if (task->tk_msg.rpc_proc->p_proc == 0) { |
| 1978 | status = -EOPNOTSUPP; | 1975 | status = -EOPNOTSUPP; |
| @@ -1989,17 +1986,14 @@ call_bind_status(struct rpc_task *task) · 10 unmodified lines | |||
| 1989 | case -EAGAIN: | 1986 | case -EAGAIN: |
| 1990 | goto retry_timeout; | 1987 | goto retry_timeout; |
| 1991 | case -ETIMEDOUT: | 1988 | case -ETIMEDOUT: |
| 1992 | dprintk("RPC: %5u rpcbind request timed out\n", | 1989 | trace_rpcb_timeout_err(task); |
| 1993 | task->tk_pid); | ||
| 1994 | goto retry_timeout; | 1990 | goto retry_timeout; |
| 1995 | case -EPFNOSUPPORT: | 1991 | case -EPFNOSUPPORT: |
| 1996 | /* server doesn't support any rpcbind version we know of */ | 1992 | /* server doesn't support any rpcbind version we know of */ |
| 1997 | dprintk("RPC: %5u unrecognized remote rpcbind service\n", | 1993 | trace_rpcb_bind_version_err(task); |
| 1998 | task->tk_pid); | ||
| 1999 | break; | 1994 | break; |
| 2000 | case -EPROTONOSUPPORT: | 1995 | case -EPROTONOSUPPORT: |
| 2001 | dprintk("RPC: %5u remote rpcbind version unavailable, retrying\n", | 1996 | trace_rpcb_bind_version_err(task); |
| 2002 | task->tk_pid); | ||
| 2003 | goto retry_timeout; | 1997 | goto retry_timeout; |
| 2004 | case -ECONNREFUSED: /* connection problems */ | 1998 | case -ECONNREFUSED: /* connection problems */ |
| 2005 | case -ECONNRESET: | 1999 | case -ECONNRESET: |
| @@ -2010,8 +2004,7 @@ call_bind_status(struct rpc_task *task) · 4 unmodified lines | |||
| 2010 | case -EHOSTUNREACH: | 2004 | case -EHOSTUNREACH: |
| 2011 | case -ENETUNREACH: | 2005 | case -ENETUNREACH: |
| 2012 | case -EPIPE: | 2006 | case -EPIPE: |
| 2013 | dprintk("RPC: %5u remote rpcbind unreachable: %d\n", | 2007 | trace_rpcb_unreachable_err(task); |
| 2014 | task->tk_pid, task->tk_status); | ||
| 2015 | if (!RPC_IS_SOFTCONN(task)) { | 2008 | if (!RPC_IS_SOFTCONN(task)) { |
| 2016 | rpc_delay(task, 5*HZ); | 2009 | rpc_delay(task, 5*HZ); |
| 2017 | goto retry_timeout; | 2010 | goto retry_timeout; |
| @@ -2019,8 +2012,7 @@ call_bind_status(struct rpc_task *task) · 1 unmodified line | |||
| 2019 | status = task->tk_status; | 2012 | status = task->tk_status; |
| 2020 | break; | 2013 | break; |
| 2021 | default: | 2014 | default: |
| 2022 | dprintk("RPC: %5u unrecognized rpcbind error (%d)\n", | 2015 | trace_rpcb_unrecognized_err(task); |
| 2023 | task->tk_pid, -task->tk_status); | ||
| 2024 | } | 2016 | } |
| 2025 | 2017 | ||
| 2026 | rpc_call_rpcerror(task, status); | 2018 | rpc_call_rpcerror(task, status); |