Skip to content
  • Andi Kleen's avatar
    mm: add __GFP_OTHER_NODE flag · 78afd561
    Andi Kleen authored
    
    
    Add a new __GFP_OTHER_NODE flag to tell the low level numa statistics in
    zone_statistics() that an allocation is on behalf of another thread.  This
    way the local and remote counters can be still correct, even when
    background daemons like khugepaged are changing memory mappings.
    
    This only affects the accounting, but I think it's worth doing that right
    to avoid confusing users.
    
    I first tried to just pass down the right node, but this required a lot of
    changes to pass down this parameter and at least one addition of a 10th
    argument to a 9 argument function.  Using the flag is a lot less
    intrusive.
    
    Open: should be also used for migration?
    
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Reviewed-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    78afd561