[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54bbe979-e6cd-47b6-bbe6-dbc58def3fc9@samsung.com>
Date: Thu, 29 Jan 2026 10:26:25 +0100
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Sai Sree Kartheek Adivi <s-adivi@...com>, robin.murphy@....com,
iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc: vigneshr@...com
Subject: Re: [PATCH v3] dma/pool: distinguish between missing and exhausted
atomic pools
On 28.01.2026 14:35, Sai Sree Kartheek Adivi wrote:
> Currently, dma_alloc_from_pool() unconditionally warns and dumps a stack
> trace when an allocation fails, with the message "Failed to get suitable
> pool".
>
> This conflates two distinct failure modes:
> 1. Configuration error: No atomic pool is available for the requested
> DMA mask (a fundamental system setup issue)
> 2. Resource Exhaustion: A suitable pool exists but is currently full (a
> recoverable runtime state)
>
> This lack of distinction prevents drivers from using __GFP_NOWARN to
> suppress error messages during temporary pressure spikes, such as when
> awaiting synchronous reclaim of descriptors.
>
> Refactor the error handling to distinguish these cases:
> - If no suitable pool is found, keep the unconditional WARN regarding
> the missing pool.
> - If a pool was found but is exhausted, respect __GFP_NOWARN and update
> the warning message to explicitly state "DMA pool exhausted".
>
> Fixes: 9420139f516d ("dma-pool: fix coherent pool allocations for IOMMU mappings")
> Signed-off-by: Sai Sree Kartheek Adivi <s-adivi@...com>
Applied to dma-mapping-fixes. Thanks!
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Powered by blists - more mailing lists