From: Trond Myklebust Date: Fri, 24 Jun 2016 14:55:45 +0000 (-0400) Subject: SUNRPC: Add a tracepoint for server socket out-of-space conditions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82ea2d7615309d755579d609ad9c11daea25d0cc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Trond Myklebust Signed-off-by: J. Bruce Fields --- diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 5664ca07c9c7..b014207a95a8 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h @@ -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), diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 4f01f63102ee..4d2189a562af 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -333,8 +333,12 @@ static bool svc_xprt_has_something_to_do(struct svc_xprt *xprt) { if (xprt->xpt_flags & ((1<xpt_flags & ((1<xpt_ops->xpo_has_wspace(xprt); + if (xprt->xpt_flags & ((1<xpt_ops->xpo_has_wspace(xprt)) + return true; + trace_svc_xprt_no_write_space(xprt); + return false; + } return false; }