mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Sai Sree Kartheek Adivi <s-adivi@ti.com>,
	robin.murphy@arm.com, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Cc: vigneshr@ti.com
Subject: Re: [PATCH v3] dma/pool: distinguish between missing and exhausted atomic pools
Date: Thu, 29 Jan 2026 10:26:25 +0100	[thread overview]
Message-ID: <54bbe979-e6cd-47b6-bbe6-dbc58def3fc9@samsung.com> (raw)
In-Reply-To: <20260128133554.3056582-1-s-adivi@ti.com>

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@ti.com>

Applied to dma-mapping-fixes. Thanks!


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


      parent reply	other threads:[~2026-01-29  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260128133621eucas1p22cd752b033c780f52b6fee2dfaec1593@eucas1p2.samsung.com>
2026-01-28 13:35 ` Sai Sree Kartheek Adivi
2026-01-28 14:05   ` Robin Murphy
2026-01-29  9:26   ` Marek Szyprowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54bbe979-e6cd-47b6-bbe6-dbc58def3fc9@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=s-adivi@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®