IB/hfi1: Add mmu_rb_node refcount to hfi1_mmu_rb_template tracepoints
authorBrendan Cunningham <bcunningham@cornelisnetworks.com>
Fri, 19 May 2023 16:54:19 +0000 (12:54 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 1 Jun 2023 17:45:57 +0000 (14:45 -0300)
commite236e2eae52e1e7fb0d38b8d921b04e527151b73
treee6812bb12f1392d2ab5db87b7d15de410890c60d
parentc9358de193ecfb360c3ce75f27ce839ca0b0bc8c
IB/hfi1: Add mmu_rb_node refcount to hfi1_mmu_rb_template tracepoints

Add kref_read() of mmu_rb_node.refcount in hfi1_mmu_rb_template-type
tracepoint output.

Change hfi1_mmu_rb_template tracepoint to take a struct mmu_rb_node* and
record the values it needs from that. This makes the trace_hfi1_mmu*()
calls shorter and easier to read.

Add hfi1_mmu_release_node() tracepoint before all
mmu_rb_node->handler->ops->remove() calls.

Make hfi1_mmu_rb_search() tracepoint its own tracepoint type separate
from hfi1_mmu_rb_template since hfi1_mmu_rb_search() does not take a
struct mmu_rb_node*.

Link: https://lore.kernel.org/r/168451525987.3702129.12824880387615916700.stgit@awfm-02.cornelisnetworks.com
Reviewed-by: Dean Luick <dean.luick@cornelisnetworks.com>
Signed-off-by: Brendan Cunningham <bcunningham@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hfi1/mmu_rb.c
drivers/infiniband/hw/hfi1/trace_mmu.h