xprtrdma: Add unique trace points for posting Local Invalidate WRs
When adding frwr_unmap_async way back when, I re-used the existing trace_xprtrdma_post_send() trace point to record the return code of ib_post_send. Unfortunately there are some cases where re-using that trace point causes a crash. Instead, construct a trace point specific to posting Local Invalidate WRs that will always be safe to use in that context, and will act as a trace log eye-catcher for Local Invalidation. Fixes:847568942f
("xprtrdma: Remove fr_state") Fixes:d8099feda4
("xprtrdma: Reduce context switching due ... ") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Bill Baker <bill.baker@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
bf7ca707ae
commit
4b93dab36f
@ -735,6 +735,31 @@ TRACE_EVENT(xprtrdma_post_recvs,
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
TRACE_EVENT(xprtrdma_post_linv,
|
||||||
|
TP_PROTO(
|
||||||
|
const struct rpcrdma_req *req,
|
||||||
|
int status
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_ARGS(req, status),
|
||||||
|
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__field(const void *, req)
|
||||||
|
__field(int, status)
|
||||||
|
__field(u32, xid)
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_fast_assign(
|
||||||
|
__entry->req = req;
|
||||||
|
__entry->status = status;
|
||||||
|
__entry->xid = be32_to_cpu(req->rl_slot.rq_xid);
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_printk("req=%p xid=0x%08x status=%d",
|
||||||
|
__entry->req, __entry->xid, __entry->status
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** Completion events
|
** Completion events
|
||||||
**/
|
**/
|
||||||
|
@ -570,7 +570,6 @@ void frwr_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
|
|||||||
*/
|
*/
|
||||||
bad_wr = NULL;
|
bad_wr = NULL;
|
||||||
rc = ib_post_send(r_xprt->rx_ia.ri_id->qp, first, &bad_wr);
|
rc = ib_post_send(r_xprt->rx_ia.ri_id->qp, first, &bad_wr);
|
||||||
trace_xprtrdma_post_send(req, rc);
|
|
||||||
|
|
||||||
/* The final LOCAL_INV WR in the chain is supposed to
|
/* The final LOCAL_INV WR in the chain is supposed to
|
||||||
* do the wake. If it was never posted, the wake will
|
* do the wake. If it was never posted, the wake will
|
||||||
@ -583,6 +582,7 @@ void frwr_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
|
|||||||
|
|
||||||
/* Recycle MRs in the LOCAL_INV chain that did not get posted.
|
/* Recycle MRs in the LOCAL_INV chain that did not get posted.
|
||||||
*/
|
*/
|
||||||
|
trace_xprtrdma_post_linv(req, rc);
|
||||||
while (bad_wr) {
|
while (bad_wr) {
|
||||||
frwr = container_of(bad_wr, struct rpcrdma_frwr,
|
frwr = container_of(bad_wr, struct rpcrdma_frwr,
|
||||||
fr_invwr);
|
fr_invwr);
|
||||||
@ -673,12 +673,12 @@ void frwr_unmap_async(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
|
|||||||
*/
|
*/
|
||||||
bad_wr = NULL;
|
bad_wr = NULL;
|
||||||
rc = ib_post_send(r_xprt->rx_ia.ri_id->qp, first, &bad_wr);
|
rc = ib_post_send(r_xprt->rx_ia.ri_id->qp, first, &bad_wr);
|
||||||
trace_xprtrdma_post_send(req, rc);
|
|
||||||
if (!rc)
|
if (!rc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Recycle MRs in the LOCAL_INV chain that did not get posted.
|
/* Recycle MRs in the LOCAL_INV chain that did not get posted.
|
||||||
*/
|
*/
|
||||||
|
trace_xprtrdma_post_linv(req, rc);
|
||||||
while (bad_wr) {
|
while (bad_wr) {
|
||||||
frwr = container_of(bad_wr, struct rpcrdma_frwr, fr_invwr);
|
frwr = container_of(bad_wr, struct rpcrdma_frwr, fr_invwr);
|
||||||
mr = container_of(frwr, struct rpcrdma_mr, frwr);
|
mr = container_of(frwr, struct rpcrdma_mr, frwr);
|
||||||
|
Loading…
Reference in New Issue
Block a user