2010-05-24 14:32:27 -07:00
|
|
|
#ifndef _LINUX_COMPACTION_H
|
|
|
|
#define _LINUX_COMPACTION_H
|
|
|
|
|
|
|
|
/* Return values for compact_zone() */
|
|
|
|
#define COMPACT_CONTINUE 0
|
|
|
|
#define COMPACT_PARTIAL 1
|
|
|
|
#define COMPACT_COMPLETE 2
|
|
|
|
|
2010-05-24 14:32:28 -07:00
|
|
|
#ifdef CONFIG_COMPACTION
|
|
|
|
extern int sysctl_compact_memory;
|
|
|
|
extern int sysctl_compaction_handler(struct ctl_table *table, int write,
|
|
|
|
void __user *buffer, size_t *length, loff_t *ppos);
|
|
|
|
#endif /* CONFIG_COMPACTION */
|
|
|
|
|
2010-05-24 14:32:29 -07:00
|
|
|
#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
|
|
|
|
extern int compaction_register_node(struct node *node);
|
|
|
|
extern void compaction_unregister_node(struct node *node);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
static inline int compaction_register_node(struct node *node)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void compaction_unregister_node(struct node *node)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
#endif /* CONFIG_COMPACTION && CONFIG_SYSFS && CONFIG_NUMA */
|
|
|
|
|
2010-05-24 14:32:27 -07:00
|
|
|
#endif /* _LINUX_COMPACTION_H */
|