diff options
author | Andi Kleen <ak@linux.intel.com> | 2011-03-22 19:33:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:44:05 -0400 |
commit | 78afd5612deb8268bafc8b6507d72341d5ed9aac (patch) | |
tree | b96131d6f237b9ce6848d95c8eccdd1f7855365c /include/linux/vmstat.h | |
parent | 11bc82d67d1150767901bca54a24466621d763d7 (diff) |
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 'include/linux/vmstat.h')
-rw-r--r-- | include/linux/vmstat.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 833e676d6d92..461c0119664f 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -220,12 +220,12 @@ static inline unsigned long node_page_state(int node, | |||
220 | zone_page_state(&zones[ZONE_MOVABLE], item); | 220 | zone_page_state(&zones[ZONE_MOVABLE], item); |
221 | } | 221 | } |
222 | 222 | ||
223 | extern void zone_statistics(struct zone *, struct zone *); | 223 | extern void zone_statistics(struct zone *, struct zone *, gfp_t gfp); |
224 | 224 | ||
225 | #else | 225 | #else |
226 | 226 | ||
227 | #define node_page_state(node, item) global_page_state(item) | 227 | #define node_page_state(node, item) global_page_state(item) |
228 | #define zone_statistics(_zl,_z) do { } while (0) | 228 | #define zone_statistics(_zl, _z, gfp) do { } while (0) |
229 | 229 | ||
230 | #endif /* CONFIG_NUMA */ | 230 | #endif /* CONFIG_NUMA */ |
231 | 231 | ||