VirtualBox

Changeset 50077 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Jan 14, 2014 9:36:56 AM (11 years ago)
Author:
vboxsync
Message:

Runtime/r0drv/linux: Use GFP_NOWARN for our memory allocations as the callers are handling out-of-memory conditions correctly. Warnings are especially not helpful when trying to allocate 2M contiguous pages as we come back trying to allocate separate pages in this case.

Location:
trunk/src/VBox/Runtime/r0drv/linux
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c

    r50008 r50077  
    181181    for (iPage = 0; iPage < cPages; iPage++)
    182182    {
    183         papPages[iPage] = alloc_page(GFP_KERNEL | __GFP_HIGHMEM);
     183        papPages[iPage] = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_NOWARN);
    184184        if (!papPages[iPage])
    185185            break;
     
    391391#if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32)
    392392    /* ZONE_DMA32: 0-4GB */
    393     paPages = alloc_pages(GFP_DMA32, cOrder);
     393    paPages = alloc_pages(GFP_DMA32 | __GFP_NOWARN, cOrder);
    394394    if (!paPages)
    395395#endif
    396396#ifdef RT_ARCH_AMD64
    397397        /* ZONE_DMA; 0-16MB */
    398         paPages = alloc_pages(GFP_DMA, cOrder);
     398        paPages = alloc_pages(GFP_DMA | __GFP_NOWARN, cOrder);
    399399#else
    400400        /* ZONE_NORMAL: 0-896MB */
    401         paPages = alloc_pages(GFP_USER, cOrder);
     401        paPages = alloc_pages(GFP_USER | __GFP_NOWARN, cOrder);
    402402#endif
    403403    if (paPages)
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r49651 r50077  
    321321    {
    322322# ifdef VBOX_USE_INSERT_PAGE
    323         paPages = alloc_pages(fFlagsLnx |  __GFP_COMP, rtR0MemObjLinuxOrder(cPages));
     323        paPages = alloc_pages(fFlagsLnx | __GFP_COMP | __GFP_NOWARN, rtR0MemObjLinuxOrder(cPages));
    324324# else
    325         paPages = alloc_pages(fFlagsLnx, rtR0MemObjLinuxOrder(cPages));
     325        paPages = alloc_pages(fFlagsLnx | __GFP_NOWARN, rtR0MemObjLinuxOrder(cPages));
    326326# endif
    327327        if (paPages)
     
    342342        for (iPage = 0; iPage < cPages; iPage++)
    343343        {
    344             pMemLnx->apPages[iPage] = alloc_page(fFlagsLnx);
     344            pMemLnx->apPages[iPage] = alloc_page(fFlagsLnx | __GFP_NOWARN);
    345345            if (RT_UNLIKELY(!pMemLnx->apPages[iPage]))
    346346            {
     
    11711171     * the dummy page is mapped all over the reserved area.
    11721172     */
    1173     pDummyPage = alloc_page(GFP_HIGHUSER);
     1173    pDummyPage = alloc_page(GFP_HIGHUSER | __GFP_NOWARN);
    11741174    if (!pDummyPage)
    11751175        return VERR_NO_MEMORY;
     
    14081408     * Allocate a dummy page for use when mapping the memory.
    14091409     */
    1410     pDummyPage = alloc_page(GFP_USER);
     1410    pDummyPage = alloc_page(GFP_USER | __GFP_NOWARN);
    14111411    if (!pDummyPage)
    14121412        return VERR_NO_MEMORY;
  • trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h

    r48383 r50077  
    151151#endif
    152152
     153#ifndef __GFP_NOWARN
     154# define __GFP_NOWARN 0
     155#endif
     156
    153157/*
    154158 * 2.4 / early 2.6 compatibility wrappers
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette