Re: [PATCH] mm/cma: add an API to enable/disable concurrent memory allocation for the CMA
From: Christoph Hellwig
Date: Tue Jan 28 2025 - 01:11:19 EST
On Fri, Jan 24, 2025 at 07:21:27PM +0800, yangge1116@xxxxxxx wrote:
> From: yangge <yangge1116@xxxxxxx>
>
> Commit 60a60e32cf91 ("Revert "mm/cma.c: remove redundant cma_mutex lock"")
> simply reverts to the original method of using the cma_mutex to ensure
> that alloc_contig_range() runs sequentially. This change was made to avoid
> concurrency allocation failures. However, it can negatively impact
> performance when concurrent allocation of CMA memory is required.
>
> To address this issue, we could introduce an API for concurrency settings,
> allowing users to decide whether their CMA can perform concurrent memory
> allocations or not.
>
> Fixes: 60a60e32cf91 ("Revert "mm/cma.c: remove redundant cma_mutex lock"")
> Signed-off-by: yangge <yangge1116@xxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>
Umm, you're adding new unused functions while not even reporting what
the problem is. This looks sketchy as hell and surely is not a stable
candidate.