Re: [PATCH] net/mlx5: allocate dma pool structs on the pool's NUMA node
From: Seongjun Hong
Date: Tue Oct 06 2026 - 09:51:52 EST
On Tue, Oct 06, 2026 at 10:10:06AM +0300, Tariq Toukan wrote:
>
>
> On 05/10/2026 16:46, Seongjun Hong wrote:
> > The mlx5 DMA pool structs (mlx5_dma_pool, mlx5_dma_pool_page and its
> > block bitmap, and mlx5_frag_buf_node_pools) are allocated without a
> > node hint, so they land on the node of whichever CPU happens to create
> > or fill the pool, whiile
>
> nit: typo
>
> > the DMA pages they describe are allocated on
> > the pool's node.
> >
> > The pool, page and bitmap are dereferenced on every block allocation
> > and free. Allocate them on the pool's NUMA node as well, so that all
> > of a pool's state lives on one node.
> >
>
> Thanks for the patch.
>
> That is true, but these structs are only used from the control path.
> That is once per WQ/CQ/EQ or doorbell record at open/close, not per packet.
>
> I doubt we can measure any benefit, so it's just a matter of consistency
> with the other fields access in data-path.
>
> The API kzalloc_node falls back if node is offline, so it's safe.
>
> No strong motivation, but we can accept it.
> Please fix the typo and emphasize that these are control-path objects.
>
Will do, thanks! :)
Best regards,
--
Seongjun Hong