Skip to content

Commit 8729aab

Browse files
chuckleverJ. Bruce Fields
authored andcommitted
SUNRPC: Fix backchannel latency metrics
I noticed that for callback requests, the reported backlog latency is always zero, and the rtt value is crazy big. The problem was that rqst->rq_xtime is never set for backchannel requests. Fixes: 7821575 ("SUNRPC: Make RTT measurement more ... ") Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 7c14905 commit 8729aab

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

net/sunrpc/xprtrdma/svc_rdma_backchannel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ rpcrdma_bc_send_request(struct svcxprt_rdma *rdma, struct rpc_rqst *rqst)
195195
pr_info("%s: %*ph\n", __func__, 64, rqst->rq_buffer);
196196
#endif
197197

198+
rqst->rq_xtime = ktime_get();
198199
rc = svc_rdma_bc_sendto(rdma, rqst, ctxt);
199200
if (rc) {
200201
svc_rdma_send_ctxt_put(rdma, ctxt);

net/sunrpc/xprtsock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2660,6 +2660,8 @@ static int bc_sendto(struct rpc_rqst *req)
26602660
.iov_len = sizeof(marker),
26612661
};
26622662

2663+
req->rq_xtime = ktime_get();
2664+
26632665
len = kernel_sendmsg(transport->sock, &msg, &iov, 1, iov.iov_len);
26642666
if (len != iov.iov_len)
26652667
return -EAGAIN;
@@ -2685,7 +2687,6 @@ static int bc_send_request(struct rpc_rqst *req)
26852687
struct svc_xprt *xprt;
26862688
int len;
26872689

2688-
dprintk("sending request with xid: %08x\n", ntohl(req->rq_xid));
26892690
/*
26902691
* Get the server socket associated with this callback xprt
26912692
*/

0 commit comments

Comments
 (0)