mm: use migrate_prep() instead of migrate_prep_local()
authorMarek Szyprowski <[email protected]>
Wed, 12 Dec 2012 21:51:19 +0000 (13:51 -0800)
committerLinus Torvalds <[email protected]>
Thu, 13 Dec 2012 01:38:32 +0000 (17:38 -0800)
__alloc_contig_migrate_range() should use all possible ways to get all the
pages migrated from the given memory range, so pruning per-cpu lru lists
for all CPUs is required, regadless the cost of such operation.  Otherwise
some pages which got stuck at per-cpu lru list might get missed by
migration procedure causing the contiguous allocation to fail.

Reported-by: SeongHwan Yoon <[email protected]>
Signed-off-by: Marek Szyprowski <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Acked-by: Michal Nazarewicz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/page_alloc.c

index 5a8d339d282a88cd0c5687596eca8023f93846ba..4171cd4f8257c4e104d9d96e3139e3a751921c55 100644 (file)
@@ -5727,7 +5727,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
        unsigned int tries = 0;
        int ret = 0;
 
-       migrate_prep_local();
+       migrate_prep();
 
        while (pfn < end || !list_empty(&cc->migratepages)) {
                if (fatal_signal_pending(current)) {