提交 601d2221 编写于 作者: C Chuck Lever 提交者: Yang Yingliang

SUNRPC: Fix backchannel latency metrics

mainline inclusion
from mainline-v5.5-rc1
commit 8729aaba
category: bugfix
bugzilla: 51810
CVE: NA

-------------------------------------------------

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: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: NLu Wei <luwei32@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2fd885ef
...@@ -198,6 +198,7 @@ rpcrdma_bc_send_request(struct svcxprt_rdma *rdma, struct rpc_rqst *rqst) ...@@ -198,6 +198,7 @@ rpcrdma_bc_send_request(struct svcxprt_rdma *rdma, struct rpc_rqst *rqst)
pr_info("%s: %*ph\n", __func__, 64, rqst->rq_buffer); pr_info("%s: %*ph\n", __func__, 64, rqst->rq_buffer);
#endif #endif
rqst->rq_xtime = ktime_get();
rc = svc_rdma_bc_sendto(rdma, rqst, ctxt); rc = svc_rdma_bc_sendto(rdma, rqst, ctxt);
if (rc) { if (rc) {
svc_rdma_send_ctxt_put(rdma, ctxt); svc_rdma_send_ctxt_put(rdma, ctxt);
......
...@@ -2698,6 +2698,9 @@ static int bc_sendto(struct rpc_rqst *req) ...@@ -2698,6 +2698,9 @@ static int bc_sendto(struct rpc_rqst *req)
tailoff = (unsigned long)xbufp->tail[0].iov_base & ~PAGE_MASK; tailoff = (unsigned long)xbufp->tail[0].iov_base & ~PAGE_MASK;
headoff = (unsigned long)xbufp->head[0].iov_base & ~PAGE_MASK; headoff = (unsigned long)xbufp->head[0].iov_base & ~PAGE_MASK;
req->rq_xtime = ktime_get();
len = svc_send_common(sock, xbufp, len = svc_send_common(sock, xbufp,
virt_to_page(xbufp->head[0].iov_base), headoff, virt_to_page(xbufp->head[0].iov_base), headoff,
xbufp->tail[0].iov_base, tailoff); xbufp->tail[0].iov_base, tailoff);
...@@ -2719,7 +2722,6 @@ static int bc_send_request(struct rpc_task *task) ...@@ -2719,7 +2722,6 @@ static int bc_send_request(struct rpc_task *task)
struct svc_xprt *xprt; struct svc_xprt *xprt;
int len; int len;
dprintk("sending request with xid: %08x\n", ntohl(req->rq_xid));
/* /*
* Get the server socket associated with this callback xprt * Get the server socket associated with this callback xprt
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册