]> www.infradead.org Git - users/jedix/linux-maple.git/commit
IB/mlx5: Create UMR QP just before first reg_mr occurs
authorJianbo Liu <jianbol@nvidia.com>
Mon, 3 Jun 2024 10:26:38 +0000 (13:26 +0300)
committerLeon Romanovsky <leon@kernel.org>
Sun, 16 Jun 2024 15:37:50 +0000 (18:37 +0300)
commit638420115cc4ad6c3a2683bf46a052b505abb202
treeb4299a72adf3813faf0efab971de711a254c601e
parentae6f6dd5fd0f77368ba5888c2c57bd23abfe4f35
IB/mlx5: Create UMR QP just before first reg_mr occurs

UMR QP is not used in some cases, so move QP and its CQ creations from
driver load flow to the time first reg_mr occurs, that is when MR
interfaces are first called.

The initialization of dev->umrc.pd and dev->umrc.lock is still done in
driver load because pd is needed for mlx5_mkey_cache_init and the lock
is reused to protect against the concurrent creation.

When testing 4G bytes memory registration latency with rtool [1] and 8
threads in parallel, there is minor performance degradation (<5% for
the max latency) is seen for the first reg_mr with this change.

Link: https://github.com/paravmellanox/rtool
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Link: https://lore.kernel.org/r/55d3c4f8a542fd974d8a4c5816eccfb318a59b38.1717409369.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/umr.c
drivers/infiniband/hw/mlx5/umr.h