diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 455cc3bfae99..6b2324bc61db 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2909,10 +2909,10 @@ static inline void zone_statistics(struct zone *preferred_zone, struct zone *z) | |||
2909 | if (!static_branch_likely(&vm_numa_stat_key)) | 2909 | if (!static_branch_likely(&vm_numa_stat_key)) |
2910 | return; | 2910 | return; |
2911 | 2911 | ||
2912 | if (z->node != numa_node_id()) | 2912 | if (zone_to_nid(z) != numa_node_id()) |
2913 | local_stat = NUMA_OTHER; | 2913 | local_stat = NUMA_OTHER; |
2914 | 2914 | ||
2915 | if (z->node == preferred_zone->node) | 2915 | if (zone_to_nid(z) == zone_to_nid(preferred_zone)) |
2916 | __inc_numa_state(z, NUMA_HIT); | 2916 | __inc_numa_state(z, NUMA_HIT); |
2917 | else { | 2917 | else { |
2918 | __inc_numa_state(z, NUMA_MISS); | 2918 | __inc_numa_state(z, NUMA_MISS); |
@@ -5278,7 +5278,7 @@ int local_memory_node(int node) | |||
5278 | z = first_zones_zonelist(node_zonelist(node, GFP_KERNEL), | 5278 | z = first_zones_zonelist(node_zonelist(node, GFP_KERNEL), |
5279 | gfp_zone(GFP_KERNEL), | 5279 | gfp_zone(GFP_KERNEL), |
5280 | NULL); | 5280 | NULL); |
5281 | return z->zone->node; | 5281 | return zone_to_nid(z->zone); |
5282 | } | 5282 | } |
5283 | #endif | 5283 | #endif |
5284 | 5284 | ||
@@ -6299,9 +6299,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat) | |||
6299 | * And all highmem pages will be managed by the buddy system. | 6299 | * And all highmem pages will be managed by the buddy system. |
6300 | */ | 6300 | */ |
6301 | zone->managed_pages = freesize; | 6301 | zone->managed_pages = freesize; |
6302 | #ifdef CONFIG_NUMA | 6302 | zone_set_nid(zone, nid); |
6303 | zone->node = nid; | ||
6304 | #endif | ||
6305 | zone->name = zone_names[j]; | 6303 | zone->name = zone_names[j]; |
6306 | zone->zone_pgdat = pgdat; | 6304 | zone->zone_pgdat = pgdat; |
6307 | spin_lock_init(&zone->lock); | 6305 | spin_lock_init(&zone->lock); |