diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:26:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:26:14 -0400 |
commit | 0cf744bc7ae8e0072159a901f6e1a159bbc30ffa (patch) | |
tree | fc8222a3a5af4f42226070c3f76462cfcf0b4e50 /include/linux/compaction.h | |
parent | b528392669415dc1e53a047215e5ad6c2de879fc (diff) | |
parent | 7f8998c7aef3ac9c5f3f2943e083dfa6302e90d0 (diff) |
Merge branch 'akpm' (fixes from Andrew Morton)
Merge patch-bomb from Andrew Morton:
- part of OCFS2 (review is laggy again)
- procfs
- slab
- all of MM
- zram, zbud
- various other random things: arch, filesystems.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (164 commits)
nosave: consolidate __nosave_{begin,end} in <asm/sections.h>
include/linux/screen_info.h: remove unused ORIG_* macros
kernel/sys.c: compat sysinfo syscall: fix undefined behavior
kernel/sys.c: whitespace fixes
acct: eliminate compile warning
kernel/async.c: switch to pr_foo()
include/linux/blkdev.h: use NULL instead of zero
include/linux/kernel.h: deduplicate code implementing clamp* macros
include/linux/kernel.h: rewrite min3, max3 and clamp using min and max
alpha: use Kbuild logic to include <asm-generic/sections.h>
frv: remove deprecated IRQF_DISABLED
frv: remove unused cpuinfo_frv and friends to fix future build error
zbud: avoid accessing last unused freelist
zsmalloc: simplify init_zspage free obj linking
mm/zsmalloc.c: correct comment for fullness group computation
zram: use notify_free to account all free notifications
zram: report maximum used memory
zram: zram memory size limitation
zsmalloc: change return value unit of zs_get_total_size_bytes
zsmalloc: move pages_allocated to zs_pool
...
Diffstat (limited to 'include/linux/compaction.h')
-rw-r--r-- | include/linux/compaction.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 01e3132820da..60bdf8dc02a3 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -2,14 +2,24 @@ | |||
2 | #define _LINUX_COMPACTION_H | 2 | #define _LINUX_COMPACTION_H |
3 | 3 | ||
4 | /* Return values for compact_zone() and try_to_compact_pages() */ | 4 | /* Return values for compact_zone() and try_to_compact_pages() */ |
5 | /* compaction didn't start as it was deferred due to past failures */ | ||
6 | #define COMPACT_DEFERRED 0 | ||
5 | /* compaction didn't start as it was not possible or direct reclaim was more suitable */ | 7 | /* compaction didn't start as it was not possible or direct reclaim was more suitable */ |
6 | #define COMPACT_SKIPPED 0 | 8 | #define COMPACT_SKIPPED 1 |
7 | /* compaction should continue to another pageblock */ | 9 | /* compaction should continue to another pageblock */ |
8 | #define COMPACT_CONTINUE 1 | 10 | #define COMPACT_CONTINUE 2 |
9 | /* direct compaction partially compacted a zone and there are suitable pages */ | 11 | /* direct compaction partially compacted a zone and there are suitable pages */ |
10 | #define COMPACT_PARTIAL 2 | 12 | #define COMPACT_PARTIAL 3 |
11 | /* The full zone was compacted */ | 13 | /* The full zone was compacted */ |
12 | #define COMPACT_COMPLETE 3 | 14 | #define COMPACT_COMPLETE 4 |
15 | |||
16 | /* Used to signal whether compaction detected need_sched() or lock contention */ | ||
17 | /* No contention detected */ | ||
18 | #define COMPACT_CONTENDED_NONE 0 | ||
19 | /* Either need_sched() was true or fatal signal pending */ | ||
20 | #define COMPACT_CONTENDED_SCHED 1 | ||
21 | /* Zone lock or lru_lock was contended in async compaction */ | ||
22 | #define COMPACT_CONTENDED_LOCK 2 | ||
13 | 23 | ||
14 | #ifdef CONFIG_COMPACTION | 24 | #ifdef CONFIG_COMPACTION |
15 | extern int sysctl_compact_memory; | 25 | extern int sysctl_compact_memory; |
@@ -22,7 +32,8 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 32 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 33 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 34 | int order, gfp_t gfp_mask, nodemask_t *mask, |
25 | enum migrate_mode mode, bool *contended); | 35 | enum migrate_mode mode, int *contended, |
36 | struct zone **candidate_zone); | ||
26 | extern void compact_pgdat(pg_data_t *pgdat, int order); | 37 | extern void compact_pgdat(pg_data_t *pgdat, int order); |
27 | extern void reset_isolation_suitable(pg_data_t *pgdat); | 38 | extern void reset_isolation_suitable(pg_data_t *pgdat); |
28 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 39 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
@@ -91,7 +102,8 @@ static inline bool compaction_restarting(struct zone *zone, int order) | |||
91 | #else | 102 | #else |
92 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 103 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
93 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 104 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
94 | enum migrate_mode mode, bool *contended) | 105 | enum migrate_mode mode, int *contended, |
106 | struct zone **candidate_zone) | ||
95 | { | 107 | { |
96 | return COMPACT_CONTINUE; | 108 | return COMPACT_CONTINUE; |
97 | } | 109 | } |