Commit 8729aaba authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields
Browse files

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: 78215759 ("SUNRPC: Make RTT measurement more ... ")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 7c149057
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@ rpcrdma_bc_send_request(struct svcxprt_rdma *rdma, struct rpc_rqst *rqst)
	pr_info("%s: %*ph\n", __func__, 64, rqst->rq_buffer);
#endif

	rqst->rq_xtime = ktime_get();
	rc = svc_rdma_bc_sendto(rdma, rqst, ctxt);
	if (rc) {
		svc_rdma_send_ctxt_put(rdma, ctxt);
+2 −1
Original line number Diff line number Diff line
@@ -2660,6 +2660,8 @@ static int bc_sendto(struct rpc_rqst *req)
		.iov_len	= sizeof(marker),
	};

	req->rq_xtime = ktime_get();

	len = kernel_sendmsg(transport->sock, &msg, &iov, 1, iov.iov_len);
	if (len != iov.iov_len)
		return -EAGAIN;
@@ -2685,7 +2687,6 @@ static int bc_send_request(struct rpc_rqst *req)
	struct svc_xprt	*xprt;
	int len;

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