Re: [PATCH] mm/slab: kmalloc with GFP_DMA32 allocate from SLAB_CACHE_DMA32

From: Christoph Hellwig
Date: Fri Mar 12 2021 - 04:31:20 EST


On Fri, Mar 12, 2021 at 04:03:20PM +0800, Jianqun Xu wrote:
> The flag GFP_DMA32 only effect in kmalloc_large currently.
>
> This patch will create caches with GFP_DMA32 to support kmalloc with
> size under KMALLOC_MAX_CACHE_SIZE.

No. No new code should use GFP_DMA32, never mind through slab.
Please use the proper DMA APIs for your addressing needs.