Re: [PATCH RFC] IB/mlx5: Reduce max order of memory allocated for xlt update

From: Jason Gunthorpe
Date: Mon Feb 22 2021 - 11:49:22 EST


On Mon, Feb 22, 2021 at 04:26:23PM +0000, Praveen Kannoju wrote:
> Ping!

Your original message didn't make it to the mailing list or
patchworks, you will need to fix your mailing environment and resend
it.

> - /*
> - * If the system already has a suitable high order page then just use
> - * that, but don't try hard to create one. This max is about 1M, so a
> - * free x86 huge page will satisfy it.
> - */
> size = min_t(size_t, ent_size * ALIGN(*nents, xlt_chunk_align),
> - MLX5_MAX_UMR_CHUNK);
> + MLX5_SPARE_UMR_CHUNK);
> *nents = size / ent_size;
> res = (void *)__get_free_pages(gfp_mask | __GFP_NOWARN,
> get_order(size));

IIRC, there is some GFP flag here that fails fast if the order is not
available, why not just use that?

Jason