aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-06-24 10:55:46 -0400
committerJ. Bruce Fields <bfields@redhat.com>2016-07-13 15:53:43 -0400
commit104f6351f7dc0036575b4e47765d6d39c757c066 (patch)
treee919bf3518ae0370aa0c6736556fc49b7abbd5ac /net
parent82ea2d7615309d755579d609ad9c11daea25d0cc (diff)
SUNRPC: Add tracepoints for dropped and deferred requests
Dropping and/or deferring requests has an impact on performance. Let's make sure we can trace those events. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/svc_xprt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 4d2189a562af..e7082a4aeb56 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -875,6 +875,7 @@ EXPORT_SYMBOL_GPL(svc_recv);
875 */ 875 */
876void svc_drop(struct svc_rqst *rqstp) 876void svc_drop(struct svc_rqst *rqstp)
877{ 877{
878 trace_svc_drop(rqstp);
878 dprintk("svc: xprt %p dropped request\n", rqstp->rq_xprt); 879 dprintk("svc: xprt %p dropped request\n", rqstp->rq_xprt);
879 svc_xprt_release(rqstp); 880 svc_xprt_release(rqstp);
880} 881}
@@ -1152,6 +1153,7 @@ static void svc_revisit(struct cache_deferred_req *dreq, int too_many)
1152 spin_unlock(&xprt->xpt_lock); 1153 spin_unlock(&xprt->xpt_lock);
1153 dprintk("revisit canceled\n"); 1154 dprintk("revisit canceled\n");
1154 svc_xprt_put(xprt); 1155 svc_xprt_put(xprt);
1156 trace_svc_drop_deferred(dr);
1155 kfree(dr); 1157 kfree(dr);
1156 return; 1158 return;
1157 } 1159 }
@@ -1209,6 +1211,7 @@ static struct cache_deferred_req *svc_defer(struct cache_req *req)
1209 set_bit(RQ_DROPME, &rqstp->rq_flags); 1211 set_bit(RQ_DROPME, &rqstp->rq_flags);
1210 1212
1211 dr->handle.revisit = svc_revisit; 1213 dr->handle.revisit = svc_revisit;
1214 trace_svc_defer(rqstp);
1212 return &dr->handle; 1215 return &dr->handle;
1213} 1216}
1214 1217
@@ -1249,6 +1252,7 @@ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_xprt *xprt)
1249 struct svc_deferred_req, 1252 struct svc_deferred_req,
1250 handle.recent); 1253 handle.recent);
1251 list_del_init(&dr->handle.recent); 1254 list_del_init(&dr->handle.recent);
1255 trace_svc_revisit_deferred(dr);
1252 } else 1256 } else
1253 clear_bit(XPT_DEFERRED, &xprt->xpt_flags); 1257 clear_bit(XPT_DEFERRED, &xprt->xpt_flags);
1254 spin_unlock(&xprt->xpt_lock); 1258 spin_unlock(&xprt->xpt_lock);