diff options
author | Mel Gorman <mel@csn.ul.ie> | 2010-05-24 17:32:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:06:59 -0400 |
commit | 76ab0f530e4a01d4dc20cdc1d5e87753c579dc18 (patch) | |
tree | 8e1566df85e02f67876685c36d217fec4845f79f /include | |
parent | 748446bb6b5a9390b546af38ec899c868a9dbcf0 (diff) |
mm: compaction: add /proc trigger for memory compaction
Add a proc file /proc/sys/vm/compact_memory. When an arbitrary value is
written to the file, all zones are compacted. The expected user of such a
trigger is a job scheduler that prepares the system before the target
application runs.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Rik van Riel <riel@redhat.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/compaction.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 465ca88615ed..572388880ba8 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -6,4 +6,10 @@ | |||
6 | #define COMPACT_PARTIAL 1 | 6 | #define COMPACT_PARTIAL 1 |
7 | #define COMPACT_COMPLETE 2 | 7 | #define COMPACT_COMPLETE 2 |
8 | 8 | ||
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 */ | ||
14 | |||
9 | #endif /* _LINUX_COMPACTION_H */ | 15 | #endif /* _LINUX_COMPACTION_H */ |