Skip to content

Commit

Permalink
mm: use migrate_prep() instead of migrate_prep_local()
Browse files Browse the repository at this point in the history
__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 <sunghwan.yun@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Marek Szyprowski authored and Linus Torvalds committed Dec 13, 2012
1 parent c8bf2d8 commit be49a6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit be49a6e

Please sign in to comment.