Re: [PATCH v3 2/2] dma-buf: system_heap: account for system heap allocation in memcg
From: T.J. Mercier
Date: Fri Jan 16 2026 - 17:37:07 EST
On Fri, Jan 16, 2026 at 12:06 PM Eric Chanudet <echanude@xxxxxxxxxx> wrote:
>
> The system dma-buf heap lets userspace allocate buffers from the page
> allocator. However, these allocations are not accounted for in memcg,
> allowing processes to escape limits that may be configured.
>
> Pass __GFP_ACCOUNT for system heap allocations, based on the
> dma_heap.mem_accounting parameter, to use memcg and account for them.
>
> Signed-off-by: Eric Chanudet <echanude@xxxxxxxxxx>
Reviewed-by: T.J. Mercier <tjmercier@xxxxxxxxxx>