mm/cma.c: take __GFP_NOWARN into account in cma_alloc()
Subsystems (2)
[email protected]
maintainerPATCH 10/18 mm/cma.c: take __GFP_NOWARN into account in cma_alloc()
From: Boris Brezillon <[email protected]>
Subject: mm/cma.c: take __GFP_NOWARN into account in cma_alloc()
cma_alloc() unconditionally prints an INFO message when the CMA allocation fails. Make this message conditional on the non-presence of __GFP_NOWARN in gfp_mask.
This patch aims at removing INFO messages that are displayed when the VC4 driver tries to allocate buffer objects. From the driver perspective an allocation failure is acceptable, and the driver can possibly do something to make following allocation succeed (like flushing the VC4 internal cache).
Signed-off-by Boris Brezillon <[email protected]>
Acked-by Laura Abbott <[email protected]>
Cc Jaewon Kim <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Eric Anholt <[email protected]>
Cc Joonsoo Kim <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/cma.c renamed from mm/cma.c~cma-take-__gfp_nowarn-into-account-in-cma_alloc +1 -1
@@ -460,7 +460,7 @@ struct page *cma_alloc(struct cma *cma,trace_cma_alloc (pfn, page, count, align); -if (ret) { +if (ret && !(gfp_mask & __GFP_NOWARN)) {pr_info ("%s: alloc failed, req-size: %zu pages, ret: %d\n" , __func__, count, ret);cma_debug_show_areas (cma);
_