Commit be49a6e1 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Linus Torvalds

mm: use migrate_prep() instead of migrate_prep_local()

__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: default avatarSeongHwan Yoon <sunghwan.yun@samsung.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c8bf2d8b
...@@ -5727,7 +5727,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, ...@@ -5727,7 +5727,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
unsigned int tries = 0; unsigned int tries = 0;
int ret = 0; int ret = 0;
migrate_prep_local(); migrate_prep();
while (pfn < end || !list_empty(&cc->migratepages)) { while (pfn < end || !list_empty(&cc->migratepages)) {
if (fatal_signal_pending(current)) { if (fatal_signal_pending(current)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment