mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 03:06:43 +00:00
svcrdma: Update some svcrdma DMA-related tracepoints
A send/recv_ctxt already records transport-related information in the cq.id, thus there is no need to record the IP addresses of the transport endpoints. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
848760a9e7
commit
2dd6e29a3e
@ -1762,29 +1762,29 @@ DEFINE_ERROR_EVENT(chunk);
|
||||
|
||||
DECLARE_EVENT_CLASS(svcrdma_dma_map_class,
|
||||
TP_PROTO(
|
||||
const struct svcxprt_rdma *rdma,
|
||||
const struct rpc_rdma_cid *cid,
|
||||
u64 dma_addr,
|
||||
u32 length
|
||||
),
|
||||
|
||||
TP_ARGS(rdma, dma_addr, length),
|
||||
TP_ARGS(cid, dma_addr, length),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, cq_id)
|
||||
__field(int, completion_id)
|
||||
__field(u64, dma_addr)
|
||||
__field(u32, length)
|
||||
__string(device, rdma->sc_cm_id->device->name)
|
||||
__string(addr, rdma->sc_xprt.xpt_remotebuf)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cq_id = cid->ci_queue_id;
|
||||
__entry->completion_id = cid->ci_completion_id;
|
||||
__entry->dma_addr = dma_addr;
|
||||
__entry->length = length;
|
||||
__assign_str(device, rdma->sc_cm_id->device->name);
|
||||
__assign_str(addr, rdma->sc_xprt.xpt_remotebuf);
|
||||
),
|
||||
|
||||
TP_printk("addr=%s device=%s dma_addr=%llu length=%u",
|
||||
__get_str(addr), __get_str(device),
|
||||
TP_printk("cq.id=%u cid=%d dma_addr=%llu length=%u",
|
||||
__entry->cq_id, __entry->completion_id,
|
||||
__entry->dma_addr, __entry->length
|
||||
)
|
||||
);
|
||||
@ -1792,11 +1792,12 @@ DECLARE_EVENT_CLASS(svcrdma_dma_map_class,
|
||||
#define DEFINE_SVC_DMA_EVENT(name) \
|
||||
DEFINE_EVENT(svcrdma_dma_map_class, svcrdma_##name, \
|
||||
TP_PROTO( \
|
||||
const struct svcxprt_rdma *rdma,\
|
||||
const struct rpc_rdma_cid *cid, \
|
||||
u64 dma_addr, \
|
||||
u32 length \
|
||||
), \
|
||||
TP_ARGS(rdma, dma_addr, length))
|
||||
TP_ARGS(cid, dma_addr, length) \
|
||||
)
|
||||
|
||||
DEFINE_SVC_DMA_EVENT(dma_map_page);
|
||||
DEFINE_SVC_DMA_EVENT(dma_map_err);
|
||||
|
@ -237,13 +237,13 @@ static void svc_rdma_send_ctxt_release(struct svcxprt_rdma *rdma,
|
||||
* remains mapped until @ctxt is destroyed.
|
||||
*/
|
||||
for (i = 1; i < ctxt->sc_send_wr.num_sge; i++) {
|
||||
trace_svcrdma_dma_unmap_page(&ctxt->sc_cid,
|
||||
ctxt->sc_sges[i].addr,
|
||||
ctxt->sc_sges[i].length);
|
||||
ib_dma_unmap_page(device,
|
||||
ctxt->sc_sges[i].addr,
|
||||
ctxt->sc_sges[i].length,
|
||||
DMA_TO_DEVICE);
|
||||
trace_svcrdma_dma_unmap_page(rdma,
|
||||
ctxt->sc_sges[i].addr,
|
||||
ctxt->sc_sges[i].length);
|
||||
}
|
||||
|
||||
llist_add(&ctxt->sc_node, &rdma->sc_send_ctxts);
|
||||
@ -550,14 +550,14 @@ static int svc_rdma_page_dma_map(void *data, struct page *page,
|
||||
if (ib_dma_mapping_error(dev, dma_addr))
|
||||
goto out_maperr;
|
||||
|
||||
trace_svcrdma_dma_map_page(rdma, dma_addr, len);
|
||||
trace_svcrdma_dma_map_page(&ctxt->sc_cid, dma_addr, len);
|
||||
ctxt->sc_sges[ctxt->sc_cur_sge_no].addr = dma_addr;
|
||||
ctxt->sc_sges[ctxt->sc_cur_sge_no].length = len;
|
||||
ctxt->sc_send_wr.num_sge++;
|
||||
return 0;
|
||||
|
||||
out_maperr:
|
||||
trace_svcrdma_dma_map_err(rdma, dma_addr, len);
|
||||
trace_svcrdma_dma_map_err(&ctxt->sc_cid, dma_addr, len);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user