mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:30:52 +07:00
SUNRPC: Make RTT measurement more precise (Send)
Some RPC transports have more overhead in their send_request callouts than others. For example, for RPC-over-RDMA: - Marshaling an RPC often has to DMA map the RPC arguments - Registration methods perform memory registration as part of marshaling To capture just server and network latencies more precisely: when sending a Call, capture the rq_xtime timestamp _after_ the transport header has been marshaled. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
0b87a46b43
commit
78215759e2
@ -1033,7 +1033,6 @@ void xprt_transmit(struct rpc_task *task)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
connect_cookie = xprt->connect_cookie;
|
connect_cookie = xprt->connect_cookie;
|
||||||
req->rq_xtime = ktime_get();
|
|
||||||
status = xprt->ops->send_request(task);
|
status = xprt->ops->send_request(task);
|
||||||
trace_xprt_transmit(xprt, req->rq_xid, status);
|
trace_xprt_transmit(xprt, req->rq_xid, status);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
|
@ -696,6 +696,7 @@ xprt_rdma_send_request(struct rpc_task *task)
|
|||||||
/* Must suppress retransmit to maintain credits */
|
/* Must suppress retransmit to maintain credits */
|
||||||
if (rqst->rq_connect_cookie == xprt->connect_cookie)
|
if (rqst->rq_connect_cookie == xprt->connect_cookie)
|
||||||
goto drop_connection;
|
goto drop_connection;
|
||||||
|
rqst->rq_xtime = ktime_get();
|
||||||
|
|
||||||
__set_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags);
|
__set_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags);
|
||||||
if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req))
|
if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req))
|
||||||
|
@ -527,6 +527,7 @@ static int xs_local_send_request(struct rpc_task *task)
|
|||||||
xs_pktdump("packet data:",
|
xs_pktdump("packet data:",
|
||||||
req->rq_svec->iov_base, req->rq_svec->iov_len);
|
req->rq_svec->iov_base, req->rq_svec->iov_len);
|
||||||
|
|
||||||
|
req->rq_xtime = ktime_get();
|
||||||
status = xs_sendpages(transport->sock, NULL, 0, xdr, req->rq_bytes_sent,
|
status = xs_sendpages(transport->sock, NULL, 0, xdr, req->rq_bytes_sent,
|
||||||
true, &sent);
|
true, &sent);
|
||||||
dprintk("RPC: %s(%u) = %d\n",
|
dprintk("RPC: %s(%u) = %d\n",
|
||||||
@ -589,6 +590,7 @@ static int xs_udp_send_request(struct rpc_task *task)
|
|||||||
|
|
||||||
if (!xprt_bound(xprt))
|
if (!xprt_bound(xprt))
|
||||||
return -ENOTCONN;
|
return -ENOTCONN;
|
||||||
|
req->rq_xtime = ktime_get();
|
||||||
status = xs_sendpages(transport->sock, xs_addr(xprt), xprt->addrlen,
|
status = xs_sendpages(transport->sock, xs_addr(xprt), xprt->addrlen,
|
||||||
xdr, req->rq_bytes_sent, true, &sent);
|
xdr, req->rq_bytes_sent, true, &sent);
|
||||||
|
|
||||||
@ -678,6 +680,7 @@ static int xs_tcp_send_request(struct rpc_task *task)
|
|||||||
/* Continue transmitting the packet/record. We must be careful
|
/* Continue transmitting the packet/record. We must be careful
|
||||||
* to cope with writespace callbacks arriving _after_ we have
|
* to cope with writespace callbacks arriving _after_ we have
|
||||||
* called sendmsg(). */
|
* called sendmsg(). */
|
||||||
|
req->rq_xtime = ktime_get();
|
||||||
while (1) {
|
while (1) {
|
||||||
sent = 0;
|
sent = 0;
|
||||||
status = xs_sendpages(transport->sock, NULL, 0, xdr,
|
status = xs_sendpages(transport->sock, NULL, 0, xdr,
|
||||||
|
Loading…
Reference in New Issue
Block a user