• Mel Gorman's avatar
    page allocator: use allocation flags as an index to the zone watermark · 41858966
    Mel Gorman authored
    
    
    ALLOC_WMARK_MIN, ALLOC_WMARK_LOW and ALLOC_WMARK_HIGH determin whether
    pages_min, pages_low or pages_high is used as the zone watermark when
    allocating the pages.  Two branches in the allocator hotpath determine
    which watermark to use.
    
    This patch uses the flags as an array index into a watermark array that is
    indexed with WMARK_* defines accessed via helpers.  All call sites that
    use zone->pages_* are updated to use the helpers for accessing the values
    and the array offsets for setting.
    Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
    Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
    Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Cc: Pekka Enberg <penberg@cs.helsinki.fi>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Cc: Dave Hansen <dave@linux.vnet.ibm.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds...
    41858966
balance 4.98 KB