• Nishanth Aravamudan's avatar
    page allocator: explicitly retry hugepage allocations · 551883ae
    Nishanth Aravamudan authored
    Add __GFP_REPEAT to hugepage allocations.  Do so to not necessitate userspace
    putting pressure on the VM by repeated echo's into /proc/sys/vm/nr_hugepages
    to grow the pool.  With the previous patch to allow for large-order
    __GFP_REPEAT attempts to loop for a bit (as opposed to indefinitely), this
    increases the likelihood of getting hugepages when the system experiences (or
    recently experienced) load.
    
    Mel tested the patchset on an x86_32 laptop.  With the patches, it was easier
    to use the proc interface to grow the hugepage pool.  The following is the
    output of a script that grows the pool as much as possible running on
    2.6.25-rc9.
    
    Allocating hugepages test
    -------------------------
    Disabling OOM Killer for current test process
    Starting page count: 0
    Attempt 1: 57 pages Progress made with 57 pages
    Attempt 2: 73 pages Progress made with 16 pages
    Attempt 3: 74 pages Progress made with 1 pages
    Attempt 4: 75 pages Progress made with 1 pages
    Attempt 5: 77 ...
    551883ae
hugetlb.c 33.5 KB