[Devel] [PATCH RHEL7 COMMIT] x86/pci-dma: don't warn about high order in dma_alloc

Konstantin Khorenko khorenko at virtuozzo.com
Thu Feb 14 17:29:19 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.83.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.83.11
------>
commit 4ef270538fae142a35c51a377bd350691ffa4f36
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date:   Mon Feb 11 19:01:26 2019 +0300

    x86/pci-dma: don't warn about high order in dma_alloc
    
    dma_generic_alloc_coherent() requires physically contiguous memory,
    hence there is no point in warning about high-order since we can't
    do anything about it:
    
    WARNING: CPU: 2 PID: 2072 at mm/page_alloc.c:3530 __alloc_pages_nodemask+0x311/0x610
    order 3 >= 3, gfp 0x80d0
    
    Call Trace:
     dump_stack+0x19/0x1b
     __warn+0xd8/0x100
     warn_slowpath_fmt+0x5f/0x80
     __alloc_pages_nodemask+0x311/0x610
     dma_generic_alloc_coherent+0x8f/0x140
     x86_swiotlb_alloc_coherent+0x21/0x50
     ocrdma_alloc_q.isra.36+0xb6/0x110 [ocrdma]
     ocrdma_init_hw+0x5bc/0x1520 [ocrdma]
     ocrdma_add+0xe2/0x800 [ocrdma]
     _be_roce_dev_add+0x18c/0x200 [be2net]
     be_roce_register_driver+0x48/0x90 [be2net]
     ocrdma_init_module+0x4a/0x1000 [ocrdma]
     do_one_initcall+0xba/0x240
     load_module+0x2796/0x2f50
     SyS_init_module+0xef/0x140
     system_call_fastpath+0x22/0x27
    
    Use __GFP_ORDER_NOWARN to hide these warnings.
    
    https://pmc.acronis.com/browse/VSTOR-20383
    https://pmc.acronis.com/browse/VSTOR-20349
    
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 arch/x86/kernel/pci-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 77a4e6222434..e0c605397a42 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -99,7 +99,7 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
 
 	dma_mask = dma_alloc_coherent_mask(dev, flag);
 
-	flag |= __GFP_ZERO;
+	flag |= __GFP_ZERO | __GFP_ORDER_NOWARN;
 again:
 	page = NULL;
 	/* CMA can be used only in the context which permits sleeping */



More information about the Devel mailing list