Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6a140bf authored by Andrea Arcangeli's avatar Andrea Arcangeli Committed by Linus Torvalds
Browse files

mm/compaction: reverse the change that forbade sync migraton with __GFP_NO_KSWAPD



It's uncertain this has been beneficial, so it's safer to undo it.  All
other compaction users would still go in synchronous mode if a first
attempt at async compaction failed.  Hopefully we don't need to force
special behavior for THP (which is the only __GFP_NO_KSWAPD user so far
and it's the easier to exercise and to be noticeable).  This also make
__GFP_NO_KSWAPD return to its original strict semantics specific to bypass
kswapd, as THP allocations have khugepaged for the async THP
allocations/compactions.

Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Cc: Alex Villacis Lasso <avillaci@fiec.espol.edu.ec>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a6cccdc3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2107,7 +2107,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
					sync_migration);
					sync_migration);
	if (page)
	if (page)
		goto got_pg;
		goto got_pg;
	sync_migration = !(gfp_mask & __GFP_NO_KSWAPD);
	sync_migration = true;


	/* Try direct reclaim and then allocating */
	/* Try direct reclaim and then allocating */
	page = __alloc_pages_direct_reclaim(gfp_mask, order,
	page = __alloc_pages_direct_reclaim(gfp_mask, order,