diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 83637dfba110..d037c8bc1512 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -611,6 +611,7 @@ static inline int free_pages_check(struct page *page) | |||
611 | bad_page(page); | 611 | bad_page(page); |
612 | return 1; | 612 | return 1; |
613 | } | 613 | } |
614 | reset_page_last_nid(page); | ||
614 | if (page->flags & PAGE_FLAGS_CHECK_AT_PREP) | 615 | if (page->flags & PAGE_FLAGS_CHECK_AT_PREP) |
615 | page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP; | 616 | page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP; |
616 | return 0; | 617 | return 0; |
@@ -3883,6 +3884,7 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, | |||
3883 | mminit_verify_page_links(page, zone, nid, pfn); | 3884 | mminit_verify_page_links(page, zone, nid, pfn); |
3884 | init_page_count(page); | 3885 | init_page_count(page); |
3885 | reset_page_mapcount(page); | 3886 | reset_page_mapcount(page); |
3887 | reset_page_last_nid(page); | ||
3886 | SetPageReserved(page); | 3888 | SetPageReserved(page); |
3887 | /* | 3889 | /* |
3888 | * Mark the block movable so that blocks are reserved for | 3890 | * Mark the block movable so that blocks are reserved for |
@@ -4526,6 +4528,11 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, | |||
4526 | int ret; | 4528 | int ret; |
4527 | 4529 | ||
4528 | pgdat_resize_init(pgdat); | 4530 | pgdat_resize_init(pgdat); |
4531 | #ifdef CONFIG_NUMA_BALANCING | ||
4532 | spin_lock_init(&pgdat->numabalancing_migrate_lock); | ||
4533 | pgdat->numabalancing_migrate_nr_pages = 0; | ||
4534 | pgdat->numabalancing_migrate_next_window = jiffies; | ||
4535 | #endif | ||
4529 | init_waitqueue_head(&pgdat->kswapd_wait); | 4536 | init_waitqueue_head(&pgdat->kswapd_wait); |
4530 | init_waitqueue_head(&pgdat->pfmemalloc_wait); | 4537 | init_waitqueue_head(&pgdat->pfmemalloc_wait); |
4531 | pgdat_page_cgroup_init(pgdat); | 4538 | pgdat_page_cgroup_init(pgdat); |
@@ -5800,7 +5807,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, | |||
5800 | 5807 | ||
5801 | ret = migrate_pages(&cc->migratepages, | 5808 | ret = migrate_pages(&cc->migratepages, |
5802 | alloc_migrate_target, | 5809 | alloc_migrate_target, |
5803 | 0, false, MIGRATE_SYNC); | 5810 | 0, false, MIGRATE_SYNC, |
5811 | MR_CMA); | ||
5804 | } | 5812 | } |
5805 | 5813 | ||
5806 | putback_movable_pages(&cc->migratepages); | 5814 | putback_movable_pages(&cc->migratepages); |