mm: compaction: add /sys trigger for per-node memory compaction
authorMel Gorman <mel@csn.ul.ie>
Mon, 24 May 2010 21:32:29 +0000 (14:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 May 2010 15:06:59 +0000 (08:06 -0700)
commited4a6d7f0676db50b5023cc01f6cda82a2f2a307
tree6496343ba964e105cf30f8703714471f22edc806
parent76ab0f530e4a01d4dc20cdc1d5e87753c579dc18
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>
Documentation/ABI/testing/sysfs-devices-node [new file with mode: 0644]
drivers/base/node.c
include/linux/compaction.h
mm/compaction.c