From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E79D37E2F6 for ; Thu, 29 Jan 2026 09:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769678789; cv=none; b=affvMKJ1FuS+5LuWG6ZKfv2sYXp+7DC7DDeS5f+PYTa1LKPn+dlTJxh19lZxrDjsKM9qvmctBryMkEzav8SxzcoJFQUy1kvgufh0OuWjphKNPtyWhFckbxccFvQIP7cqfOwdPesYFny0ARLAMtpObRRrhE0apBIb7yEvXg4QObs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769678789; c=relaxed/simple; bh=ccCONtcKXqhEmPk5QvgW5SUMXkuoJOfXstA43EsiTc0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=mU78/U665uMUWmb0e7WRPUZ/r0a91ONrzdzuUMCu2pkBNrJlVwmA79iUJhqKAPjh+y0uEEF9B6FCjYpnwGDTtZBN1eGCu5j2PtAOovzeZrIaPfn6WF+5lAvih17h88akigxFeGJWipXIDiGAHEhzd2xEcxLYvFBwLuLxQ1NCc4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=q50TIiOA; arc=none smtp.client-ip=210.118.77.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="q50TIiOA" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20260129092626euoutp021ff863404fc620a97067f92a2193a240~PKXreVj7X2226722267euoutp02L for ; Thu, 29 Jan 2026 09:26:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20260129092626euoutp021ff863404fc620a97067f92a2193a240~PKXreVj7X2226722267euoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1769678786; bh=lwek8TSmv+iAAOe/4I9DJSelYRcZUta7xs3BWN/rHR8=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=q50TIiOAkKe0oT5Exb6V9nrwyJidUB8VdusDlzjB4JuJGkHHxJjKlDHv+tojGpxng qeunvWEupx1C90g/MpXUTIbiQNDxbmGOM9qMe/ImXzOVsAMSKWEf6ySBLiB2w2Memo zRPx/rGjTkkqLh2TbOOWH04zpK7S/AVGET7zM0Ik= Received: from eusmtip1.samsung.com (unknown [203.254.199.221]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20260129092626eucas1p136c77b24b0fbc18b7d5c70351503b81c~PKXrWGvNi3254632546eucas1p1y; Thu, 29 Jan 2026 09:26:26 +0000 (GMT) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260129092625eusmtip15a81d9ceb1844cd1e892901fc4754e07~PKXrFv2mQ0295602956eusmtip1h; Thu, 29 Jan 2026 09:26:25 +0000 (GMT) Message-ID: <54bbe979-e6cd-47b6-bbe6-dbc58def3fc9@samsung.com> Date: Thu, 29 Jan 2026 10:26:25 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Betterbird (Windows) Subject: Re: [PATCH v3] dma/pool: distinguish between missing and exhausted atomic pools To: Sai Sree Kartheek Adivi , robin.murphy@arm.com, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Cc: vigneshr@ti.com Content-Language: en-US From: Marek Szyprowski In-Reply-To: <20260128133554.3056582-1-s-adivi@ti.com> Content-Transfer-Encoding: 7bit X-CMS-MailID: 20260129092626eucas1p136c77b24b0fbc18b7d5c70351503b81c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20260128133621eucas1p22cd752b033c780f52b6fee2dfaec1593 X-EPHeader: CA X-CMS-RootMailID: 20260128133621eucas1p22cd752b033c780f52b6fee2dfaec1593 References: <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 Applied to dma-mapping-fixes. Thanks! Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland