diff options
author | Mel Gorman <mel@csn.ul.ie> | 2010-05-24 14:32:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 08:06:59 -0700 |
commit | ed4a6d7f0676db50b5023cc01f6cda82a2f2a307 (patch) | |
tree | 6496343ba964e105cf30f8703714471f22edc806 /drivers/base | |
parent | 76ab0f530e4a01d4dc20cdc1d5e87753c579dc18 (diff) | |
download | op-kernel-dev-ed4a6d7f0676db50b5023cc01f6cda82a2f2a307.zip op-kernel-dev-ed4a6d7f0676db50b5023cc01f6cda82a2f2a307.tar.gz |
mm: compaction: add /sys trigger for per-node memory compaction
Add a per-node sysfs file called compact. When the file is written to,
each zone in that node is compacted. The intention that this would be
used by something like a job scheduler in a batch system before a job
starts so that the job can allocate the maximum number of hugepages
without significant start-up cost.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Rik van Riel <riel@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/node.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index 057979a..2bdd8a9 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -9,6 +9,7 @@ #include <linux/memory.h> #include <linux/node.h> #include <linux/hugetlb.h> +#include <linux/compaction.h> #include <linux/cpumask.h> #include <linux/topology.h> #include <linux/nodemask.h> @@ -246,6 +247,8 @@ int register_node(struct node *node, int num, struct node *parent) scan_unevictable_register_node(node); hugetlb_register_node(node); + + compaction_register_node(node); } return error; } |