Commit 5e771905 authored by Committed by Linus Torvalds
mm: compaction: add a tunable that decides when memory should be compacted and...
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. [firstname.lastname@example.org: Fix build errors when proc fs is not configured] Signed-off-by: Mel Gorman <email@example.com> Signed-off-by: Randy Dunlap <firstname.lastname@example.org> Cc: Rik van Riel <email@example.com> Cc: Minchan Kim <firstname.lastname@example.org> Cc: KOSAKI Motohiro <email@example.com> Cc: Christoph Lameter <firstname.lastname@example.org> Cc: KAMEZAWA Hiroyuki <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
Showing with 44 additions and 1 deletion