From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Robin Murphy <robin.murphy@arm.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma/pool: eliminate alloc_pages warning in atomic_pool_expand
Date: Tue, 2 Dec 2025 09:49:07 -0600 [thread overview]
Message-ID: <15be97c9-b287-4376-9fc1-9d574cb23d82@oracle.com> (raw)
In-Reply-To: <8b72d722-5e68-404b-bcb0-04b7daa2a24d@arm.com>
On 12/2/25 9:47AM, Robin Murphy wrote:
> On 2025-12-02 3:28 pm, Dave Kleikamp wrote:
>> atomic_pool_expand iterately tries the allocation while decrementing the
>
> "iteratively"?
Oops.
>
>> page order. There is no need to issue a warning if an attempted
>> allocation fails.
>>
>> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
>> ---
>> kernel/dma/pool.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c
>> index ee45dee33d49..26392badc36b 100644
>> --- a/kernel/dma/pool.c
>> +++ b/kernel/dma/pool.c
>> @@ -93,7 +93,7 @@ static int atomic_pool_expand(struct gen_pool *pool,
>> size_t pool_size,
>> page = dma_alloc_from_contiguous(NULL, 1 << order,
>> order, false);
>> if (!page)
>> - page = alloc_pages(gfp, order);
>> + page = alloc_pages(gfp | __GFP_NOWARN, order);
>
> Might be nice to keep some kind of warning if we entirely fail all the
> way down to order 0, although I guess if it matters it would show up via
> the warning on dma_alloc_from_pool() failure soon enough anyway...
>
> Either way it certainly makes sense in general;
>
> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Thanks
>
>> } while (!page && order-- > 0);
>> if (!page)
>> goto out;
>
next prev parent reply other threads:[~2025-12-02 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20251202152846eucas1p201ac63a0baab0ac4ead2fb25fdbaf1e0@eucas1p2.samsung.com>
2025-12-02 15:28 ` Dave Kleikamp
2025-12-02 15:47 ` Robin Murphy
2025-12-02 15:49 ` Dave Kleikamp [this message]
2025-12-08 8:41 ` Marek Szyprowski
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=15be97c9-b287-4376-9fc1-9d574cb23d82@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.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®