Skip to content

Commit

Permalink
mm: compaction: use synchronous compaction for /proc/sys/vm/compact_m…
Browse files Browse the repository at this point in the history
…emory

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 <mgorman@suse.de>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Andy Isaacson <adi@hexapodia.org>
Cc: Nai Xia <nai.xia@gmail.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Jan 13, 2012
1 parent a77ebd3 commit b16d3d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit b16d3d5

Please sign in to comment.