Re: [PATCH rdma-next 0/4] RDMA: use kmalloc() for remaining scratch buffers
From: Mike Rapoport
Date: Thu Jul 16 2026 - 01:52:44 EST
On Wed, Jul 15, 2026 at 02:03:08PM +0300, Leon Romanovsky wrote:
> The series [PATCH v2 0/5] RDMA, IB: replace __get_free_pages() with
> kmalloc() [1] replaced direct page allocator use in RDMA buffers that
> have no page-specific requirements. Continue that cleanup for the remaining
> scratch buffers in cxgb4, mlx4, usnic and mlx5.
>
> Use kmalloc() or kzalloc() to retain the existing physically contiguous
> storage and alignment while avoiding casts and allowing kfree() to derive
> the allocation size. The mlx5 patch converts every allocation tier in the
> shared UMR buffer allocator so its cleanup path does not mix allocator
> families.
>
> Allocations in qedr, cxgb4 and bnxt_re that back userspace mappings are
> intentionally unchanged. Those buffers are passed to vm_insert_page() or
> io_remap_pfn_range() and must remain individual page allocations rather
> than slab pages.
>
> [1] https://lore.kernel.org/all/20260713-b4-rdma-v2-0-65d2a1a5180c@xxxxxxxxxx/
>
> Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@xxxxxxxxxx
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
Thanks, Leon!
--
Sincerely yours,
Mike.