diff options
author | Andi Kleen <ak@linux.intel.com> | 2011-03-22 16:33:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 17:44:05 -0700 |
commit | 78afd5612deb8268bafc8b6507d72341d5ed9aac (patch) | |
tree | b96131d6f237b9ce6848d95c8eccdd1f7855365c /mm/page_alloc.c | |
parent | 11bc82d67d1150767901bca54a24466621d763d7 (diff) | |
download | talos-obmc-linux-78afd5612deb8268bafc8b6507d72341d5ed9aac.tar.gz talos-obmc-linux-78afd5612deb8268bafc8b6507d72341d5ed9aac.zip |
mm: add __GFP_OTHER_NODE flag
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: Andi Kleen <ak@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6d0032bdb5d8..136a547262a0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1337,7 +1337,7 @@ again: } __count_zone_vm_events(PGALLOC, zone, 1 << order); - zone_statistics(preferred_zone, zone); + zone_statistics(preferred_zone, zone, gfp_flags); local_irq_restore(flags); VM_BUG_ON(bad_range(zone, page)); |