mm: remember what the preferred zone is for zone_statistics
[safe/jmp/linux-2.6] / mm / vmstat.c
index 7c7286e..879bcc0 100644 (file)
@@ -364,13 +364,13 @@ void refresh_cpu_vm_stats(int cpu)
  *
  * Must be called with interrupts disabled.
  */
-void zone_statistics(struct zonelist *zonelist, struct zone *z)
+void zone_statistics(struct zone *preferred_zone, struct zone *z)
 {
-       if (z->zone_pgdat == zonelist->zones[0]->zone_pgdat) {
+       if (z->zone_pgdat == preferred_zone->zone_pgdat) {
                __inc_zone_state(z, NUMA_HIT);
        } else {
                __inc_zone_state(z, NUMA_MISS);
-               __inc_zone_state(zonelist->zones[0], NUMA_FOREIGN);
+               __inc_zone_state(preferred_zone, NUMA_FOREIGN);
        }
        if (z->node == numa_node_id())
                __inc_zone_state(z, NUMA_LOCAL);