mm: compaction: add a tunable that decides when memory should be compacted and when it should be reclaimed

Previous thread: fs-writeback: check sync bit earlier in inode_wait_for_writeback by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 8:59 am. (1 message)

Next thread: highmem: remove unneeded #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT for debug_kmap_atomic() by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 8:59 am. (1 message)
From: Linux Kernel Mailing List
Date: Tuesday, May 25, 2010 - 8:59 am

Gitweb:     http://git.kernel.org/linus/5e7719058079a1423ccce56148b0aaa56b2df821
Commit:     5e7719058079a1423ccce56148b0aaa56b2df821
Parent:     56de7263fcf3eb10c8dcdf8d59a9cec831795f3f
Author:     Mel Gorman <mel@csn.ul.ie>
AuthorDate: Mon May 24 14:32:31 2010 -0700
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Tue May 25 08:06:59 2010 -0700

    mm: compaction: add a tunable that decides when memory should be compacted and when it should be reclaimed
    
    The kernel applies some heuristics when deciding if memory should be
    compacted or reclaimed to satisfy a high-order allocation.  One of these
    is based on the fragmentation.  If the index is below 500, memory will not
    be compacted.  This choice is arbitrary and not based on data.  To help
    optimise the system and set a sensible default for this value, this patch
    adds a sysctl extfrag_threshold.  The kernel will only compact memory if
    the fragmentation index is above the extfrag_threshold.
    
    [randy.dunlap@oracle.com: Fix build errors when proc fs is not configured]
    Signed-off-by: Mel Gorman <mel@csn.ul.ie>
    Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Minchan Kim <minchan.kim@gmail.com>
    Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Cc: Christoph Lameter <cl@linux-foundation.org>
    Cc: 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/sysctl/vm.txt |   15 +++++++++++++++
 include/linux/compaction.h  |    3 +++
 kernel/sysctl.c             |   15 +++++++++++++++
 mm/compaction.c             |   12 +++++++++++-
 4 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 56dd29b..5fdbb61 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -27,6 ...
Previous thread: fs-writeback: check sync bit earlier in inode_wait_for_writeback by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 8:59 am. (1 message)

Next thread: highmem: remove unneeded #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT for debug_kmap_atomic() by Linux Kernel Mailing List on Tuesday, May 25, 2010 - 8:59 am. (1 message)