diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2012-10-09 10:03:21 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-10-09 10:04:25 -0400 |
commit | ffe315012510165ce82e4dd4767f0a5dba9edbf7 (patch) | |
tree | f601cd980af9d0ced5ca9aedecef4fa0d2ca0e15 /include/linux/compaction.h | |
parent | e2d3a35ee427aaba99b6c68a56609ce276c51270 (diff) | |
parent | 4a8e43feeac7996b8de2d5b2823e316917493df4 (diff) |
Merge tag 'disintegrate-mtd-20121009' of git://git.infradead.org/users/dhowells/linux-headers
UAPI Disintegration 2012-10-09
Conflicts:
MAINTAINERS
arch/arm/configs/bcmring_defconfig
arch/arm/mach-imx/clk-imx51-imx53.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/nand_bcm_umi.h
drivers/mtd/nand/orion_nand.c
Diffstat (limited to 'include/linux/compaction.h')
-rw-r--r-- | include/linux/compaction.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 133ddcf8339..6ecb6dc2f30 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -22,8 +22,9 @@ 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); | 25 | bool sync, bool *contended, struct page **page); |
26 | extern int compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); |
27 | extern void reset_isolation_suitable(pg_data_t *pgdat); | ||
27 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 28 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
28 | 29 | ||
29 | /* Do not skip compaction more than 64 times */ | 30 | /* Do not skip compaction more than 64 times */ |
@@ -61,10 +62,20 @@ static inline bool compaction_deferred(struct zone *zone, int order) | |||
61 | return zone->compact_considered < defer_limit; | 62 | return zone->compact_considered < defer_limit; |
62 | } | 63 | } |
63 | 64 | ||
65 | /* Returns true if restarting compaction after many failures */ | ||
66 | static inline bool compaction_restarting(struct zone *zone, int order) | ||
67 | { | ||
68 | if (order < zone->compact_order_failed) | ||
69 | return false; | ||
70 | |||
71 | return zone->compact_defer_shift == COMPACT_MAX_DEFER_SHIFT && | ||
72 | zone->compact_considered >= 1UL << zone->compact_defer_shift; | ||
73 | } | ||
74 | |||
64 | #else | 75 | #else |
65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 76 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 77 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
67 | bool sync) | 78 | bool sync, bool *contended, struct page **page) |
68 | { | 79 | { |
69 | return COMPACT_CONTINUE; | 80 | return COMPACT_CONTINUE; |
70 | } | 81 | } |
@@ -74,6 +85,10 @@ static inline int compact_pgdat(pg_data_t *pgdat, int order) | |||
74 | return COMPACT_CONTINUE; | 85 | return COMPACT_CONTINUE; |
75 | } | 86 | } |
76 | 87 | ||
88 | static inline void reset_isolation_suitable(pg_data_t *pgdat) | ||
89 | { | ||
90 | } | ||
91 | |||
77 | static inline unsigned long compaction_suitable(struct zone *zone, int order) | 92 | static inline unsigned long compaction_suitable(struct zone *zone, int order) |
78 | { | 93 | { |
79 | return COMPACT_SKIPPED; | 94 | return COMPACT_SKIPPED; |