diff options
author | David Rientjes <rientjes@google.com> | 2014-06-04 19:08:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:06 -0400 |
commit | e0b9daeb453e602a95ea43853dc12d385558ce1f (patch) | |
tree | febaa53d23065ef97ab8608ca4e9ec9c47e36f2c /include/linux | |
parent | 35979ef3393110ff3c12c6b94552208d3bdf1a36 (diff) |
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.
[akpm@linux-foundation.org: fix build]
[iamjoonsoo.kim@lge.com: use MIGRATE_SYNC in alloc_contig_range()]
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: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/compaction.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 7e1c76e3cd68..01e3132820da 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -22,7 +22,7 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 24 | int order, gfp_t gfp_mask, nodemask_t *mask, |
25 | bool sync, bool *contended); | 25 | enum migrate_mode mode, bool *contended); |
26 | extern void compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern void compact_pgdat(pg_data_t *pgdat, int order); |
27 | extern void reset_isolation_suitable(pg_data_t *pgdat); | 27 | extern void reset_isolation_suitable(pg_data_t *pgdat); |
28 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 28 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
@@ -91,7 +91,7 @@ static inline bool compaction_restarting(struct zone *zone, int order) | |||
91 | #else | 91 | #else |
92 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 92 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
93 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 93 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
94 | bool sync, bool *contended) | 94 | enum migrate_mode mode, bool *contended) |
95 | { | 95 | { |
96 | return COMPACT_CONTINUE; | 96 | return COMPACT_CONTINUE; |
97 | } | 97 | } |