diff options
author | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
commit | b32e3dc7860d00124fa432dba09667e647cb9bcc (patch) | |
tree | 2fa6e56f389431dfb84609d3d7572cad76e88e71 /mm/vmstat.c | |
parent | 6604271c5bc658a6067ed0c3deba4d89e0e50382 (diff) | |
parent | 96120d86fe302c006259baee9061eea9e1b9e486 (diff) |
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 0c3b5048773e..772b39b87d95 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -500,8 +500,12 @@ void refresh_cpu_vm_stats(int cpu) | |||
500 | * z = the zone from which the allocation occurred. | 500 | * z = the zone from which the allocation occurred. |
501 | * | 501 | * |
502 | * Must be called with interrupts disabled. | 502 | * Must be called with interrupts disabled. |
503 | * | ||
504 | * When __GFP_OTHER_NODE is set assume the node of the preferred | ||
505 | * zone is the local node. This is useful for daemons who allocate | ||
506 | * memory on behalf of other processes. | ||
503 | */ | 507 | */ |
504 | void zone_statistics(struct zone *preferred_zone, struct zone *z) | 508 | void zone_statistics(struct zone *preferred_zone, struct zone *z, gfp_t flags) |
505 | { | 509 | { |
506 | if (z->zone_pgdat == preferred_zone->zone_pgdat) { | 510 | if (z->zone_pgdat == preferred_zone->zone_pgdat) { |
507 | __inc_zone_state(z, NUMA_HIT); | 511 | __inc_zone_state(z, NUMA_HIT); |
@@ -509,7 +513,8 @@ void zone_statistics(struct zone *preferred_zone, struct zone *z) | |||
509 | __inc_zone_state(z, NUMA_MISS); | 513 | __inc_zone_state(z, NUMA_MISS); |
510 | __inc_zone_state(preferred_zone, NUMA_FOREIGN); | 514 | __inc_zone_state(preferred_zone, NUMA_FOREIGN); |
511 | } | 515 | } |
512 | if (z->node == numa_node_id()) | 516 | if (z->node == ((flags & __GFP_OTHER_NODE) ? |
517 | preferred_zone->node : numa_node_id())) | ||
513 | __inc_zone_state(z, NUMA_LOCAL); | 518 | __inc_zone_state(z, NUMA_LOCAL); |
514 | else | 519 | else |
515 | __inc_zone_state(z, NUMA_OTHER); | 520 | __inc_zone_state(z, NUMA_OTHER); |