]> Git Repo - linux.git/commitdiff
mm: compaction: do not compact pgdat for order-0
authorMel Gorman <[email protected]>
Wed, 11 Sep 2013 21:22:19 +0000 (14:22 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Sep 2013 22:57:55 +0000 (15:57 -0700)
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.

[[email protected]: pointed out that it was a potential problem]
Signed-off-by: Mel Gorman <[email protected]>
Cc: Hillf Danton <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/compaction.c

index 05ccb4cc0bdb984dc2613461703587ec199804cd..c43789388cd8667536bfd9644a5bbe2cd0d35f3e 100644 (file)
@@ -1131,6 +1131,9 @@ void compact_pgdat(pg_data_t *pgdat, int order)
                .sync = false,
        };
 
+       if (!order)
+               return;
+
        __compact_pgdat(pgdat, &cc);
 }
 
This page took 0.051764 seconds and 4 git commands to generate.