blob: ba98cfe0ae1502a81a7ed13c1bb571856bee9c6e [file] [log] [blame]
Mel Gorman748446b2010-05-24 14:32:27 -07001#ifndef _LINUX_COMPACTION_H
2#define _LINUX_COMPACTION_H
3
4/* Return values for compact_zone() */
5#define COMPACT_CONTINUE 0
6#define COMPACT_PARTIAL 1
7#define COMPACT_COMPLETE 2
8
Mel Gorman76ab0f52010-05-24 14:32:28 -07009#ifdef CONFIG_COMPACTION
10extern int sysctl_compact_memory;
11extern int sysctl_compaction_handler(struct ctl_table *table, int write,
12 void __user *buffer, size_t *length, loff_t *ppos);
13#endif /* CONFIG_COMPACTION */
14
Mel Gormaned4a6d72010-05-24 14:32:29 -070015#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
16extern int compaction_register_node(struct node *node);
17extern void compaction_unregister_node(struct node *node);
18
19#else
20
21static inline int compaction_register_node(struct node *node)
22{
23 return 0;
24}
25
26static inline void compaction_unregister_node(struct node *node)
27{
28}
29#endif /* CONFIG_COMPACTION && CONFIG_SYSFS && CONFIG_NUMA */
30
Mel Gorman748446b2010-05-24 14:32:27 -070031#endif /* _LINUX_COMPACTION_H */