diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-01-31 21:16:22 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-01-31 21:16:22 -0800 |
| commit | a1f3d4bba8ea395a39d34ade6017afee8be16031 (patch) | |
| tree | 874d843d35622f17aa6c3e048e42cf0d679bcb75 /include/linux/compaction.h | |
| parent | 723d928417bffff6467da155d8ebbbe016464012 (diff) | |
| parent | ebf53826e105f488f4f628703a108e98940d1dc5 (diff) | |
Merge commit 'v2.6.38-rc3' into next
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 @@ /* The full zone was compacted */ #define COMPACT_COMPLETE 3 +#define COMPACT_MODE_DIRECT_RECLAIM 0 +#define COMPACT_MODE_KSWAPD 1 + #ifdef CONFIG_COMPACTION extern int sysctl_compact_memory; 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, extern int fragmentation_index(struct zone *zone, unsigned int order); extern unsigned long try_to_compact_pages(struct zonelist *zonelist, - int order, gfp_t gfp_mask, nodemask_t *mask); + int order, gfp_t gfp_mask, nodemask_t *mask, + bool sync); +extern unsigned long compaction_suitable(struct zone *zone, int order); +extern unsigned long compact_zone_order(struct zone *zone, int order, + gfp_t gfp_mask, bool sync, + int compact_mode); /* Do not skip compaction more than 64 times */ #define COMPACT_MAX_DEFER_SHIFT 6 @@ -54,7 +62,20 @@ static inline bool compaction_deferred(struct zone *zone) #else static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, - int order, gfp_t gfp_mask, nodemask_t *nodemask) + int order, gfp_t gfp_mask, nodemask_t *nodemask, + bool sync) +{ + return COMPACT_CONTINUE; +} + +static inline unsigned long compaction_suitable(struct zone *zone, int order) +{ + return COMPACT_SKIPPED; +} + +static inline unsigned long compact_zone_order(struct zone *zone, int order, + gfp_t gfp_mask, bool sync, + int compact_mode) { return COMPACT_CONTINUE; } |
