Skip to content
  • Andrea Arcangeli's avatar
    thp: _GFP_NO_KSWAPD · 32dba98e
    Andrea Arcangeli authored
    
    
    Transparent hugepage allocations must be allowed not to invoke kswapd or
    any other kind of indirect reclaim (especially when the defrag sysfs is
    control disabled).  It's unacceptable to swap out anonymous pages
    (potentially anonymous transparent hugepages) in order to create new
    transparent hugepages.  This is true for the MADV_HUGEPAGE areas too
    (swapping out a kvm virtual machine and so having it suffer an unbearable
    slowdown, so another one with guest physical memory marked MADV_HUGEPAGE
    can run 30% faster if it is running memory intensive workloads, makes no
    sense).  If a transparent hugepage allocation fails the slowdown is minor
    and there is total fallback, so kswapd should never be asked to swapout
    memory to allow the high order allocation to succeed.
    
    Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
    Acked-by: default avatarRik van Riel <riel@redhat.com>
    Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    32dba98e