]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, compaction: embed migration mode in compact_control
authorDavid Rientjes <rientjes@google.com>
Thu, 22 May 2014 00:43:12 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:12 +0000 (10:43 +1000)
commitf6a698d33fd52cd78f7621fd1fbc3380bb5347a5
treec1a877b851e4ad090702aeafc94194f0ea56638a
parenta74756e7686d904b88fe5907cff8deef57133768
mm, compaction: embed migration mode in compact_control

We're going to want to manipulate the migration mode for compaction in the
page allocator, and currently compact_control's sync field is only a bool.

Currently, we only do MIGRATE_ASYNC or MIGRATE_SYNC_LIGHT compaction
depending on the value of this bool.  Convert the bool to enum
migrate_mode and pass the migration mode in directly.  Later, we'll want
to avoid MIGRATE_SYNC_LIGHT for thp allocations in the pagefault patch to
avoid unnecessary latency.

This also alters compaction triggered from sysfs, either for the entire
system or for a node, to force MIGRATE_SYNC.

Signed-off-by: David Rientjes <rientjes@google.com>
Suggested-by: Mel Gorman <mgorman@suse.de>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Greg Thelen <gthelen@google.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/compaction.h
mm/compaction.c
mm/internal.h
mm/page_alloc.c