Skip to content

Commit a23c76e

Browse files
committed
svcrdma: trace cc_release calls
This event brackets the svcrdma_post_* trace points. If this trace event is enabled but does not appear as expected, that indicates a chunk_ctxt leak. Reviewed-by: Jeff Layton <jlayton@kernel.org> Acked-by: Tom Talpey <tom@talpey.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 91f8ce2 commit a23c76e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

include/trace/events/rpcrdma.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,6 +2112,14 @@ DEFINE_POST_CHUNK_EVENT(read);
21122112
DEFINE_POST_CHUNK_EVENT(write);
21132113
DEFINE_POST_CHUNK_EVENT(reply);
21142114

2115+
DEFINE_EVENT(svcrdma_post_chunk_class, svcrdma_cc_release,
2116+
TP_PROTO(
2117+
const struct rpc_rdma_cid *cid,
2118+
int sqecount
2119+
),
2120+
TP_ARGS(cid, sqecount)
2121+
);
2122+
21152123
TRACE_EVENT(svcrdma_wc_read,
21162124
TP_PROTO(
21172125
const struct ib_wc *wc,

net/sunrpc/xprtrdma/svc_rdma_rw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ static void svc_rdma_cc_release(struct svc_rdma_chunk_ctxt *cc,
191191
struct svc_rdma_rw_ctxt *ctxt;
192192
LLIST_HEAD(free);
193193

194+
trace_svcrdma_cc_release(&cc->cc_cid, cc->cc_sqecount);
195+
194196
first = last = NULL;
195197
while ((ctxt = svc_rdma_next_ctxt(&cc->cc_rwctxts)) != NULL) {
196198
list_del(&ctxt->rw_list);

0 commit comments

Comments
 (0)