Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 78215759e20d ("SUNRPC: Make RTT measurement more ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Chuck Lever and committed by
J. Bruce Fields
8729aaba 7c149057

+3 -1
+1
net/sunrpc/xprtrdma/svc_rdma_backchannel.c
··· 195 195 pr_info("%s: %*ph\n", __func__, 64, rqst->rq_buffer); 196 196 #endif 197 197 198 + rqst->rq_xtime = ktime_get(); 198 199 rc = svc_rdma_bc_sendto(rdma, rqst, ctxt); 199 200 if (rc) { 200 201 svc_rdma_send_ctxt_put(rdma, ctxt);
+2 -1
net/sunrpc/xprtsock.c
··· 2660 2660 .iov_len = sizeof(marker), 2661 2661 }; 2662 2662 2663 + req->rq_xtime = ktime_get(); 2664 + 2663 2665 len = kernel_sendmsg(transport->sock, &msg, &iov, 1, iov.iov_len); 2664 2666 if (len != iov.iov_len) 2665 2667 return -EAGAIN; ··· 2687 2685 struct svc_xprt *xprt; 2688 2686 int len; 2689 2687 2690 - dprintk("sending request with xid: %08x\n", ntohl(req->rq_xid)); 2691 2688 /* 2692 2689 * Get the server socket associated with this callback xprt 2693 2690 */