diff options
-rw-r--r-- | include/linux/mmzone.h | 1 | ||||
-rw-r--r-- | mm/page_alloc.c | 17 |
2 files changed, 2 insertions, 16 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index fac5509c18f0..c1dbe0ba9f82 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -763,7 +763,6 @@ typedef struct pglist_data { | |||
763 | unsigned long node_spanned_pages; /* total size of physical page | 763 | unsigned long node_spanned_pages; /* total size of physical page |
764 | range, including holes */ | 764 | range, including holes */ |
765 | int node_id; | 765 | int node_id; |
766 | nodemask_t reclaim_nodes; /* Nodes allowed to reclaim from */ | ||
767 | wait_queue_head_t kswapd_wait; | 766 | wait_queue_head_t kswapd_wait; |
768 | wait_queue_head_t pfmemalloc_wait; | 767 | wait_queue_head_t pfmemalloc_wait; |
769 | struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */ | 768 | struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */ |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index dfe954fbb48a..9f13bcfb6762 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1850,16 +1850,8 @@ static bool zone_local(struct zone *local_zone, struct zone *zone) | |||
1850 | 1850 | ||
1851 | static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone) | 1851 | static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone) |
1852 | { | 1852 | { |
1853 | return node_isset(local_zone->node, zone->zone_pgdat->reclaim_nodes); | 1853 | return node_distance(zone_to_nid(local_zone), zone_to_nid(zone)) < |
1854 | } | 1854 | RECLAIM_DISTANCE; |
1855 | |||
1856 | static void __paginginit init_zone_allows_reclaim(int nid) | ||
1857 | { | ||
1858 | int i; | ||
1859 | |||
1860 | for_each_node_state(i, N_MEMORY) | ||
1861 | if (node_distance(nid, i) <= RECLAIM_DISTANCE) | ||
1862 | node_set(i, NODE_DATA(nid)->reclaim_nodes); | ||
1863 | } | 1855 | } |
1864 | 1856 | ||
1865 | #else /* CONFIG_NUMA */ | 1857 | #else /* CONFIG_NUMA */ |
@@ -1893,9 +1885,6 @@ static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone) | |||
1893 | return true; | 1885 | return true; |
1894 | } | 1886 | } |
1895 | 1887 | ||
1896 | static inline void init_zone_allows_reclaim(int nid) | ||
1897 | { | ||
1898 | } | ||
1899 | #endif /* CONFIG_NUMA */ | 1888 | #endif /* CONFIG_NUMA */ |
1900 | 1889 | ||
1901 | /* | 1890 | /* |
@@ -4933,8 +4922,6 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size, | |||
4933 | 4922 | ||
4934 | pgdat->node_id = nid; | 4923 | pgdat->node_id = nid; |
4935 | pgdat->node_start_pfn = node_start_pfn; | 4924 | pgdat->node_start_pfn = node_start_pfn; |
4936 | if (node_state(nid, N_MEMORY)) | ||
4937 | init_zone_allows_reclaim(nid); | ||
4938 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 4925 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
4939 | get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); | 4926 | get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); |
4940 | #endif | 4927 | #endif |