mm: compaction: add /sys trigger for per-node memory compaction
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / compaction.h
blobba98cfe0ae1502a81a7ed13c1bb571856bee9c6e
1 #ifndef _LINUX_COMPACTION_H
2 #define _LINUX_COMPACTION_H
4 /* Return values for compact_zone() */
5 #define COMPACT_CONTINUE 0
6 #define COMPACT_PARTIAL 1
7 #define COMPACT_COMPLETE 2
9 #ifdef CONFIG_COMPACTION
10 extern int sysctl_compact_memory;
11 extern int sysctl_compaction_handler(struct ctl_table *table, int write,
12 void __user *buffer, size_t *length, loff_t *ppos);
13 #endif /* CONFIG_COMPACTION */
15 #if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
16 extern int compaction_register_node(struct node *node);
17 extern void compaction_unregister_node(struct node *node);
19 #else
21 static inline int compaction_register_node(struct node *node)
23 return 0;
26 static inline void compaction_unregister_node(struct node *node)
29 #endif /* CONFIG_COMPACTION && CONFIG_SYSFS && CONFIG_NUMA */
31 #endif /* _LINUX_COMPACTION_H */