Skip to content

ODP information and statistics

Leon Romanovsky linux-rdma 3 versions – Applied

Status from this message: applied to for-next, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 2 repliesApplied
  2. v24 patches 6 repliesSuperseded
  3. v14 patches 11 repliesSuperseded

Changes in v3 from the cover letter · 23 lines

* Implement batch count of "invalidataions".
* "prefetched" ounter is dropped, will be separated to two separate counters (RQ/SQ) later once Jason's ODP rework will be finished.
v2: https://lore.kernel.org/linux-rdma/[email protected]
* Since umems can disappear during rereg flow and the fact that we
are not locking its during our counter usage (uverbs prevents this
by holding the uobject write lock), expose possible race bugs. Move
the counters into mlx5_ib_mr to avoid racing bugs (related patches
- #1, #3 & #4).
* Fix page invalidation counting (Patch #1).
* Make the code more elegant by defining fill_function type and use it within res_common_{dumpit, doit} (Patch #2).
* Put an ODP implicit indicator within mlx5 reg MR operation,
indicating when a given MR is ODP implicit registered and use
its indication when dumping ODP type.
* Since the counters has been moved to mlx5_ib_mr, the ODP stats are now filled with internal to mlx5 driver function. Remove the fill_odp_stats device operation from the reason mentioned above.
v1: https://lore.kernel.org/linux-rdma/[email protected]
* Dropped umem patch, because it doesn't follow our IB model, where
UMEM is driver object and ib_core object (Jason).
* Removed the ODP type indicator from ib_umem_odp not needed after
commit fd7dbf035edc ("RDMA/odp: Make it clearer when a umem is an implicit ODP umem")
* Since umems are not part of core MR (from the reason mentioned
above) there is no way to access the odp type as was previously done via nldev (old patch #3). Instead, patch #4 is adding mlx5 implementation for fill_res_entry and dumping ODP type as part of the driver table entry, as its driver details.
* Counter types are now atomic64_t instead of u64.
v0: https://lore.kernel.org/linux-rdma/[email protected]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4IB/mlx5: Introduce ODP diagnostic countersdrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/odp.c include/rdma/ib_verbs.h+24 -00 replies
2/4RDMA/nldev: Allow different fill function per resourcedrivers/infiniband/core/nldev.c+23 -210 replies
3/4RDMA/mlx5: Return ODP type per MRdrivers/infiniband/core/nldev.c drivers/infiniband/hw/mlx5/Makefile drivers/infiniband/hw/mlx5/main.c +4 more+71 -10 replies
4/4RDMA/nldev: Provide MR statisticsdrivers/infiniband/core/device.c drivers/infiniband/core/nldev.c drivers/infiniband/hw/mlx5/main.c +4 more+94 -41 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH rdma-next v3 0/4] ODP information and statistics

From: Leon Romanovsky <[email protected]>

Changelog:
v3:
* Implement batch count of "invalidataions".
* "prefetched" ounter is dropped, will be separated to two separate counters (RQ/SQ) later once Jason's ODP rework will be finished.
v2: https://lore.kernel.org/linux-rdma/[email protected]
* Since umems can disappear during rereg flow and the fact that we
are not locking its during our counter usage (uverbs prevents this
by holding the uobject write lock), expose possible race bugs. Move
the counters into mlx5_ib_mr to avoid racing bugs (related patches
- #1, #3 & #4).
* Fix page invalidation counting (Patch #1).
* Make the code more elegant by defining fill_function type and use it within res_common_{dumpit, doit} (Patch #2).
* Put an ODP implicit indicator within mlx5 reg MR operation,
indicating when a given MR is ODP implicit registered and use
its indication when dumping ODP type.
* Since the counters has been moved to mlx5_ib_mr, the ODP stats are now filled with internal to mlx5 driver function. Remove the fill_odp_stats device operation from the reason mentioned above.
v1: https://lore.kernel.org/linux-rdma/[email protected]
* Dropped umem patch, because it doesn't follow our IB model, where
UMEM is driver object and ib_core object (Jason).
* Removed the ODP type indicator from ib_umem_odp not needed after
commit fd7dbf035edc ("RDMA/odp: Make it clearer when a umem is an implicit ODP umem")
* Since umems are not part of core MR (from the reason mentioned
above) there is no way to access the odp type as was previously done via nldev (old patch #3). Instead, patch #4 is adding mlx5 implementation for fill_res_entry and dumping ODP type as part of the driver table entry, as its driver details.
* Counter types are now atomic64_t instead of u64.
v0: https://lore.kernel.org/linux-rdma/[email protected]

-----------------------------------------------------------------------------
Hi,

This series from Erez refactors exposes ODP type information (explicit, implicit) and statistics through netlink interface.

Thanks

Erez Alfasi (4):
IB/mlx5: Introduce ODP diagnostic counters RDMA/nldev: Allow different fill function per resource RDMA/mlx5: Return ODP type per MR
RDMA/nldev: Provide MR statistics

 drivers/infiniband/core/device.c      |  1 +
 drivers/infiniband/core/nldev.c       | 98 ++++++++++++++++++++-------
 drivers/infiniband/hw/mlx5/Makefile   |  2 +-
 drivers/infiniband/hw/mlx5/main.c     |  3 +
 drivers/infiniband/hw/mlx5/mlx5_ib.h  |  9 +++
 drivers/infiniband/hw/mlx5/odp.c      | 17 +++++
 drivers/infiniband/hw/mlx5/restrack.c | 90 ++++++++++++++++++++++++
 include/rdma/ib_verbs.h               | 12 ++++
 include/rdma/restrack.h               |  6 ++
 9 files changed, 212 insertions(+), 26 deletions(-)
 create mode 100644 drivers/infiniband/hw/mlx5/restrack.c

--
2.20.1