• Mel Gorman's avatar
    mm: only set page->pfmemalloc when ALLOC_NO_WATERMARKS was used · cfd19c5a
    Mel Gorman authored
    __alloc_pages_slowpath() is called when the number of free pages is below
    the low watermark.  If the caller is entitled to use ALLOC_NO_WATERMARKS
    then the page will be marked page->pfmemalloc.  This protects more pages
    than are strictly necessary as we only need to protect pages allocated
    below the min watermark (the pfmemalloc reserves).
    
    This patch only sets page->pfmemalloc when ALLOC_NO_WATERMARKS was
    required to allocate the page.
    
    [rientjes@google.com: David noticed the problem during review]
    Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
    Cc: David Miller <davem@davemloft.net>
    Cc: Neil Brown <neilb@suse.de>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Mike Christie <michaelc@cs.wisc.edu>
    Cc: Eric B Munson <emunson@mgebm.net>
    Cc: Eric Dumazet <eric.dumazet@gmail.com>
    Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Christoph Lameter <cl@linux.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    cfd19c5a
page_alloc.c 166 KB