diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-06-24 10:55:45 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-07-13 15:53:42 -0400 |
commit | 82ea2d7615309d755579d609ad9c11daea25d0cc (patch) | |
tree | 70e74dc49f8f0990b808cac0cb22eb178236d1a6 | |
parent | d28c442f5bd5471adc4d1add5fa78109f811c0a3 (diff) |
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 <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | include/trace/events/sunrpc.h | 10 | ||||
-rw-r--r-- | net/sunrpc/svc_xprt.c | 8 |
2 files changed, 15 insertions, 3 deletions
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, | |||
553 | __entry->pid, show_svc_xprt_flags(__entry->flags)) | 553 | __entry->pid, show_svc_xprt_flags(__entry->flags)) |
554 | ); | 554 | ); |
555 | 555 | ||
556 | TRACE_EVENT(svc_xprt_dequeue, | 556 | DECLARE_EVENT_CLASS(svc_xprt_event, |
557 | TP_PROTO(struct svc_xprt *xprt), | 557 | TP_PROTO(struct svc_xprt *xprt), |
558 | 558 | ||
559 | TP_ARGS(xprt), | 559 | TP_ARGS(xprt), |
@@ -582,6 +582,14 @@ TRACE_EVENT(svc_xprt_dequeue, | |||
582 | show_svc_xprt_flags(__entry->flags)) | 582 | show_svc_xprt_flags(__entry->flags)) |
583 | ); | 583 | ); |
584 | 584 | ||
585 | DEFINE_EVENT(svc_xprt_event, svc_xprt_dequeue, | ||
586 | TP_PROTO(struct svc_xprt *xprt), | ||
587 | TP_ARGS(xprt)); | ||
588 | |||
589 | DEFINE_EVENT(svc_xprt_event, svc_xprt_no_write_space, | ||
590 | TP_PROTO(struct svc_xprt *xprt), | ||
591 | TP_ARGS(xprt)); | ||
592 | |||
585 | TRACE_EVENT(svc_wake_up, | 593 | TRACE_EVENT(svc_wake_up, |
586 | TP_PROTO(int pid), | 594 | TP_PROTO(int pid), |
587 | 595 | ||
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) | |||
333 | { | 333 | { |
334 | if (xprt->xpt_flags & ((1<<XPT_CONN)|(1<<XPT_CLOSE))) | 334 | if (xprt->xpt_flags & ((1<<XPT_CONN)|(1<<XPT_CLOSE))) |
335 | return true; | 335 | return true; |
336 | if (xprt->xpt_flags & ((1<<XPT_DATA)|(1<<XPT_DEFERRED))) | 336 | if (xprt->xpt_flags & ((1<<XPT_DATA)|(1<<XPT_DEFERRED))) { |
337 | return xprt->xpt_ops->xpo_has_wspace(xprt); | 337 | if (xprt->xpt_ops->xpo_has_wspace(xprt)) |
338 | return true; | ||
339 | trace_svc_xprt_no_write_space(xprt); | ||
340 | return false; | ||
341 | } | ||
338 | return false; | 342 | return false; |
339 | } | 343 | } |
340 | 344 | ||