diff options
Diffstat (limited to 'include/linux/compaction.h')
| -rw-r--r-- | include/linux/compaction.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 5ac51552d908..dfa2ed4c0d26 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
| @@ -11,6 +11,9 @@ | |||
| 11 | /* The full zone was compacted */ | 11 | /* The full zone was compacted */ |
| 12 | #define COMPACT_COMPLETE 3 | 12 | #define COMPACT_COMPLETE 3 |
| 13 | 13 | ||
| 14 | #define COMPACT_MODE_DIRECT_RECLAIM 0 | ||
| 15 | #define COMPACT_MODE_KSWAPD 1 | ||
| 16 | |||
| 14 | #ifdef CONFIG_COMPACTION | 17 | #ifdef CONFIG_COMPACTION |
| 15 | extern int sysctl_compact_memory; | 18 | extern int sysctl_compact_memory; |
| 16 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, | 19 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, |
| @@ -21,7 +24,12 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
| 21 | 24 | ||
| 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 25 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
| 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 26 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 24 | int order, gfp_t gfp_mask, nodemask_t *mask); | 27 | int order, gfp_t gfp_mask, nodemask_t *mask, |
| 28 | bool sync); | ||
| 29 | extern unsigned long compaction_suitable(struct zone *zone, int order); | ||
| 30 | extern unsigned long compact_zone_order(struct zone *zone, int order, | ||
| 31 | gfp_t gfp_mask, bool sync, | ||
| 32 | int compact_mode); | ||
| 25 | 33 | ||
| 26 | /* Do not skip compaction more than 64 times */ | 34 | /* Do not skip compaction more than 64 times */ |
| 27 | #define COMPACT_MAX_DEFER_SHIFT 6 | 35 | #define COMPACT_MAX_DEFER_SHIFT 6 |
| @@ -54,7 +62,20 @@ static inline bool compaction_deferred(struct zone *zone) | |||
| 54 | 62 | ||
| 55 | #else | 63 | #else |
| 56 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 64 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 57 | int order, gfp_t gfp_mask, nodemask_t *nodemask) | 65 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 66 | bool sync) | ||
| 67 | { | ||
| 68 | return COMPACT_CONTINUE; | ||
| 69 | } | ||
| 70 | |||
| 71 | static inline unsigned long compaction_suitable(struct zone *zone, int order) | ||
| 72 | { | ||
| 73 | return COMPACT_SKIPPED; | ||
| 74 | } | ||
| 75 | |||
| 76 | static inline unsigned long compact_zone_order(struct zone *zone, int order, | ||
| 77 | gfp_t gfp_mask, bool sync, | ||
| 78 | int compact_mode) | ||
| 58 | { | 79 | { |
| 59 | return COMPACT_CONTINUE; | 80 | return COMPACT_CONTINUE; |
| 60 | } | 81 | } |
