Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82ea2d76 authored by Trond Myklebust's avatar Trond Myklebust Committed by J. Bruce Fields
Browse files

SUNRPC: Add a tracepoint for server socket out-of-space conditions



Add a tracepoint to track when the processing of incoming RPC data gets
deferred due to out-of-space issues on the outgoing transport.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent d28c442f
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ TRACE_EVENT(svc_xprt_do_enqueue,
		__entry->pid, show_svc_xprt_flags(__entry->flags))
);

TRACE_EVENT(svc_xprt_dequeue,
DECLARE_EVENT_CLASS(svc_xprt_event,
	TP_PROTO(struct svc_xprt *xprt),

	TP_ARGS(xprt),
@@ -582,6 +582,14 @@ TRACE_EVENT(svc_xprt_dequeue,
		show_svc_xprt_flags(__entry->flags))
);

DEFINE_EVENT(svc_xprt_event, svc_xprt_dequeue,
	TP_PROTO(struct svc_xprt *xprt),
	TP_ARGS(xprt));

DEFINE_EVENT(svc_xprt_event, svc_xprt_no_write_space,
	TP_PROTO(struct svc_xprt *xprt),
	TP_ARGS(xprt));

TRACE_EVENT(svc_wake_up,
	TP_PROTO(int pid),

+6 −2
Original line number Diff line number Diff line
@@ -333,8 +333,12 @@ static bool svc_xprt_has_something_to_do(struct svc_xprt *xprt)
{
	if (xprt->xpt_flags & ((1<<XPT_CONN)|(1<<XPT_CLOSE)))
		return true;
	if (xprt->xpt_flags & ((1<<XPT_DATA)|(1<<XPT_DEFERRED)))
		return xprt->xpt_ops->xpo_has_wspace(xprt);
	if (xprt->xpt_flags & ((1<<XPT_DATA)|(1<<XPT_DEFERRED))) {
		if (xprt->xpt_ops->xpo_has_wspace(xprt))
			return true;
		trace_svc_xprt_no_write_space(xprt);
		return false;
	}
	return false;
}