Commit 3a7200af3d9227767869f451ed747aff07d8df48

Authored by Mel Gorman
Committed by Linus Torvalds
1 parent 90c7a79cc4

mm: compaction: do not compact pgdat for order-0

If kswapd was reclaiming for a high order and resets it to 0 due to
fragmentation it will still call compact_pgdat.  For the most part, this
will fail a compaction_suitable() test and not compact but it is
unnecessarily sloppy.  It could be fixed in the caller but fix it in the
API instead.

[dhillf@gmail.com: pointed out that it was a potential problem]
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Hillf Danton <dhillf@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

... ... @@ -1131,6 +1131,9 @@
1131 1131 .sync = false,
1132 1132 };
1133 1133  
  1134 + if (!order)
  1135 + return;
  1136 +
1134 1137 __compact_pgdat(pgdat, &cc);
1135 1138 }
1136 1139