lkml.org 
[lkml]   [2021]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH rdma-next 8/9] RDMA: Globally allocate and release QP memory
From
Date
On 18/07/2021 15:00, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> Convert QP object to follow IB/core general allocation scheme.
> That change allows us to make sure that restrack properly kref
> the memory.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

EFA and core parts look good to me.
Reviewed-by: Gal Pressman <galpress@amazon.com>
Tested-by: Gal Pressman <galpress@amazon.com>

> +static inline void *rdma_zalloc_obj(struct ib_device *dev, size_t size,
> + gfp_t gfp, bool is_numa_aware)
> +{
> + if (is_numa_aware && dev->ops.get_numa_node)

Honestly I think it's better to return an error if a numa aware allocation is
requested and get_numa_node is not provided.

> + return kzalloc_node(size, gfp, dev->ops.get_numa_node(dev));
> +
> + return kzalloc(size, gfp);
> +}

\
 
 \ /
  Last update: 2021-07-19 15:43    [W:0.112 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site