[Devel] [PATCH rh7 1/4] x86: Add __GFP_ORDER_NOWARN to dma allocations.

Andrey Ryabinin aryabinin at virtuozzo.com
Mon Feb 25 13:10:17 MSK 2019


Fix warnings like this:
 WARNING: CPU: 8 PID: 51 at mm/page_alloc.c:3531 __alloc_pages_nodemask+0x311/0x610
 order 9 >= 3, gfp 0x80d0
 CPU: 8 PID: 51 Comm: kworker/8:0 ve: 0 Tainted: G        W      ------------ T 3.10.0-957.1.3.vz7.83.12 #1 83.12

 Call Trace:
  [<ffffffff9e391fd8>] dump_stack+0x19/0x1b
  [<ffffffff9dc98778>] __warn+0xd8/0x100
  [<ffffffff9dc987ff>] warn_slowpath_fmt+0x5f/0x80
  [<ffffffff9ddd4371>] __alloc_pages_nodemask+0x311/0x610
  [<ffffffff9de26a78>] alloc_pages_current+0x98/0x110
  [<ffffffff9e21e98f>] intel_alloc_coherent+0x5f/0x150
  [<ffffffffc08f7690>] i40iw_allocate_dma_mem+0xa0/0x100 [i40iw]
  [<ffffffffc08ec62c>] i40iw_add_sd_table_entry+0x5c/0x150 [i40iw]
  [<ffffffffc08ecb07>] i40iw_sc_create_hmc_obj+0x137/0x460 [i40iw]
  [<ffffffffc08f0321>] i40iw_open.part.10+0x921/0x17f0 [i40iw]
  [<ffffffffc08f122b>] i40iw_open+0x3b/0x50 [i40iw]
  [<ffffffffc04f19cd>] i40e_client_subtask+0xbd/0x130 [i40e]
  [<ffffffffc04d408f>] i40e_service_task+0x62f/0x1360 [i40e]
  [<ffffffff9dcbc1e2>] process_one_work+0x182/0x440
  [<ffffffff9dcbd396>] worker_thread+0x126/0x3c0
  [<ffffffff9dcc4401>] kthread+0xd1/0xe0
  [<ffffffff9e3a4cf7>] ret_from_fork_nospec_begin+0x21/0x21

https://pmc.acronis.com/browse/VSTOR-20675
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 arch/x86/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index c313ddbaa109..3dc09005e934 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -106,7 +106,7 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
 	if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
 		gfp |= GFP_DMA32;
 #endif
-       return gfp;
+       return gfp | __GFP_ORDER_NOWARN;
 }
 
 #endif
-- 
2.19.2



More information about the Devel mailing list