[lkml]   [2011]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch] mm: thp: disable defrag for page faults per default
    With defrag mode enabled per default, huge page allocations pass
    __GFP_WAIT and may drop compaction into sync-mode where they wait for
    pages under writeback.

    I observe applications hang for several minutes(!) when they fault in
    huge pages and compaction starts to wait on in-"flight" USB stick IO.

    This patch disables defrag mode for page fault allocations unless the
    VMA is madvised explicitely. Khugepaged will continue to allocate
    with __GFP_WAIT per default, but stalls are not a problem of
    application responsiveness there.

    Signed-off-by: Johannes Weiner <>
    mm/huge_memory.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/mm/huge_memory.c b/mm/huge_memory.c
    index 81532f2..8c8ff29 100644
    --- a/mm/huge_memory.c
    +++ b/mm/huge_memory.c
    @@ -35,7 +35,7 @@ unsigned long transparent_hugepage_flags __read_mostly =

    /* default scan 8*512 pte (or vmas) every 30 second */

     \ /
      Last update: 2011-07-25 22:41    [W:0.019 / U:73.620 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site