aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNimrod Oren <noren@nvidia.com>2026-08-03 16:25:19 +0300
committerJakub Kicinski <kuba@kernel.org>2026-08-05 19:02:15 -0700
commitc29235677f5e3645e7d7324c5d51aaa78ee9b006 (patch)
tree89d2f49fb377603d51f571b87e1622d81f2cbf53 /include
parent46f636cd620e2ff5a941fe8c6af19f8d82122b40 (diff)
net/mlx5: allocate doorbells from dma pools
Allocate doorbells from dma pools instead of the pgdir allocator. Doorbell records remain cache-line sized coherent DMA allocations, but their sub-allocation is now handled by the common mlx5 DMA pool infrastructure. This also makes doorbell allocation honor the requested NUMA node when reusing existing backing pages. The old pgdir allocator used the requested node only when allocating a new pgdir page; later allocations scanned one global pgdir list and could take any pgdir with a free entry, even if that page had been allocated for a different NUMA node. Selecting the per-node DMA pool before sub-allocation keeps reused doorbell records on pages allocated for the requested node. Signed-off-by: Nimrod Oren <noren@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260803132520.2891860-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/driver.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 4246d6d904ba..2c56bb1d676d 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -599,9 +599,6 @@ struct mlx5_priv {
struct mutex alloc_mutex;
int numa_node;
- struct mutex pgdir_mutex;
- struct list_head pgdir_list;
-
struct mlx5_frag_buf_node_pools **frag_buf_node_pools;
struct mlx5_dma_pool **db_node_pools;
/* end: alloc stuff */
@@ -808,7 +805,7 @@ struct mlx5_core_dev {
struct mlx5_db {
__be32 *db;
union {
- struct mlx5_db_pgdir *pgdir;
+ struct mlx5_dma_pool_page *pool_page;
struct mlx5_ib_user_db_page *user_page;
} u;
dma_addr_t dma;