Commit 015747d2 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

SUNRPC: Replace dprintk() call site in xs_nospace()

"no socket space" is an exceptional and infrequent condition
that troubleshooters want to know about.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 9ce07ae5
...@@ -898,6 +898,34 @@ DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection); ...@@ -898,6 +898,34 @@ DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection);
DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); DEFINE_RPC_SOCKET_EVENT(rpc_socket_close);
DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown);
TRACE_EVENT(rpc_socket_nospace,
TP_PROTO(
const struct rpc_rqst *rqst,
const struct sock_xprt *transport
),
TP_ARGS(rqst, transport),
TP_STRUCT__entry(
__field(unsigned int, task_id)
__field(unsigned int, client_id)
__field(unsigned int, total)
__field(unsigned int, remaining)
),
TP_fast_assign(
__entry->task_id = rqst->rq_task->tk_pid;
__entry->client_id = rqst->rq_task->tk_client->cl_clid;
__entry->total = rqst->rq_slen;
__entry->remaining = rqst->rq_slen - transport->xmit.offset;
),
TP_printk("task:%u@%u total=%u remaining=%u",
__entry->task_id, __entry->client_id,
__entry->total, __entry->remaining
)
);
TRACE_DEFINE_ENUM(XPRT_LOCKED); TRACE_DEFINE_ENUM(XPRT_LOCKED);
TRACE_DEFINE_ENUM(XPRT_CONNECTED); TRACE_DEFINE_ENUM(XPRT_CONNECTED);
TRACE_DEFINE_ENUM(XPRT_CONNECTING); TRACE_DEFINE_ENUM(XPRT_CONNECTING);
......
...@@ -762,10 +762,7 @@ static int xs_nospace(struct rpc_rqst *req) ...@@ -762,10 +762,7 @@ static int xs_nospace(struct rpc_rqst *req)
struct sock *sk = transport->inet; struct sock *sk = transport->inet;
int ret = -EAGAIN; int ret = -EAGAIN;
dprintk("RPC: %5u xmit incomplete (%u left of %u)\n", trace_rpc_socket_nospace(req, transport);
req->rq_task->tk_pid,
req->rq_slen - transport->xmit.offset,
req->rq_slen);
/* Protect against races with write_space */ /* Protect against races with write_space */
spin_lock(&xprt->transport_lock); spin_lock(&xprt->transport_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment