diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-03-27 17:51:39 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-04-03 22:08:12 +0300 |
commit | aaba72cd4e793fbf1c04e06dee3d2c3710339678 (patch) | |
tree | 07c10dd49ba18ca0cee58d1a96d27505d53f1378 /net/sunrpc/svc_xprt.c | |
parent | 0b9547bf6b94317b3f8e2496dc2b44cb6e599b01 (diff) | |
download | linux-aaba72cd4e793fbf1c04e06dee3d2c3710339678.tar.xz |
sunrpc: Report per-RPC execution stats
Introduce a mechanism to report the server-side execution latency of
each RPC. The goal is to enable user space to filter the trace
record for latency outliers, build histograms, etc.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index f745754a55ea..a7425da14f5b 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -782,7 +782,7 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt) len = svc_deferred_recv(rqstp); else len = xprt->xpt_ops->xpo_recvfrom(rqstp); - dprintk("svc: got len=%d\n", len); + rqstp->rq_stime = ktime_get(); rqstp->rq_reserved = serv->sv_max_mesg; atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved); } @@ -888,6 +888,7 @@ int svc_send(struct svc_rqst *rqstp) /* Grab mutex to serialize outgoing data. */ mutex_lock(&xprt->xpt_mutex); + trace_svc_stats_latency(rqstp); if (test_bit(XPT_DEAD, &xprt->xpt_flags) || test_bit(XPT_CLOSE, &xprt->xpt_flags)) len = -ENOTCONN; |