aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/compaction.h14
-rw-r--r--include/linux/kernel.h7
2 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 5ac51552d908..2592883d862d 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -22,6 +22,9 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
22extern int fragmentation_index(struct zone *zone, unsigned int order); 22extern int fragmentation_index(struct zone *zone, unsigned int order);
23extern unsigned long try_to_compact_pages(struct zonelist *zonelist, 23extern 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);
25extern unsigned long compaction_suitable(struct zone *zone, int order);
26extern unsigned long compact_zone_order(struct zone *zone, int order,
27 gfp_t gfp_mask);
25 28
26/* Do not skip compaction more than 64 times */ 29/* Do not skip compaction more than 64 times */
27#define COMPACT_MAX_DEFER_SHIFT 6 30#define COMPACT_MAX_DEFER_SHIFT 6
@@ -59,6 +62,17 @@ static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
59 return COMPACT_CONTINUE; 62 return COMPACT_CONTINUE;
60} 63}
61 64
65static inline unsigned long compaction_suitable(struct zone *zone, int order)
66{
67 return COMPACT_SKIPPED;
68}
69
70static inline unsigned long compact_zone_order(struct zone *zone, int order,
71 gfp_t gfp_mask)
72{
73 return 0;
74}
75
62static inline void defer_compaction(struct zone *zone) 76static inline void defer_compaction(struct zone *zone)
63{ 77{
64} 78}
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 57dac7022b63..5a9d9059520b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -600,6 +600,13 @@ struct sysinfo {
600#define NUMA_BUILD 0 600#define NUMA_BUILD 0
601#endif 601#endif
602 602
603/* This helps us avoid #ifdef CONFIG_COMPACTION */
604#ifdef CONFIG_COMPACTION
605#define COMPACTION_BUILD 1
606#else
607#define COMPACTION_BUILD 0
608#endif
609
603/* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ 610/* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */
604#ifdef CONFIG_FTRACE_MCOUNT_RECORD 611#ifdef CONFIG_FTRACE_MCOUNT_RECORD
605# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD 612# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD