From: Mel Gorman Date: Fri, 13 Jan 2012 01:19:26 +0000 (-0800) Subject: mm: compaction: use synchronous compaction for /proc/sys/vm/compact_memory X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b16d3d5a5219d01e9be5e586e5d50fbf1ca955ea;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm: compaction: use synchronous compaction for /proc/sys/vm/compact_memory 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 Reviewed-by: Andrea Arcangeli Reviewed-by: Rik van Riel Reviewed-by: Minchan Kim Cc: Dave Jones Cc: Jan Kara Cc: Andy Isaacson Cc: Nai Xia Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/compaction.c b/mm/compaction.c index 396ea2b47f7e..d31e64becb38 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -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];