mm: compaction: use synchronous compaction for /proc/sys/vm/compact_memory
authorMel Gorman <[email protected]>
Fri, 13 Jan 2012 01:19:26 +0000 (17:19 -0800)
committerLinus Torvalds <[email protected]>
Fri, 13 Jan 2012 04:13:08 +0000 (20:13 -0800)
When asynchronous compaction was introduced, the
/proc/sys/vm/compact_memory handler should have been updated to always use
synchronous compaction.  This did not happen so this patch addresses it.

The assumption is if a user writes to /proc/sys/vm/compact_memory, they
are willing for that process to stall.

Signed-off-by: Mel Gorman <[email protected]>
Reviewed-by: Andrea Arcangeli <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Andy Isaacson <[email protected]>
Cc: Nai Xia <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/compaction.c

index 396ea2b47f7e9b94003b328246b80fcc19e55511..d31e64becb387b6b618b0e6d81bf6073773b08bf 100644 (file)
@@ -668,6 +668,7 @@ static int compact_node(int nid)
                        .nr_freepages = 0,
                        .nr_migratepages = 0,
                        .order = -1,
+                       .sync = true,
                };
 
                zone = &pgdat->node_zones[zoneid];