aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorPeter W Morreale <pmorreale@novell.com>2009-04-06 22:00:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 11:31:03 -0400
commitfafd688e4c0c34da0f3de909881117d374e4c7af (patch)
tree5c61d499b96d78f5b56507a5d34af0ccd7c69060 /Documentation
parenta56ed663047fc9927ec8b35750d23ece54f85dc7 (diff)
mm: add /proc controls for pdflush threads
Add /proc entries to give the admin the ability to control the minimum and maximum number of pdflush threads. This allows finer control of pdflush on both large and small machines. The rationale is simply one size does not fit all. Admins on large and/or small systems may want to tune the min/max pdflush thread count to best suit their needs. Right now the min/max is hardcoded to 2/8. While probably a fair estimate for smaller machines, large machines with large numbers of CPUs and large numbers of filesystems/block devices may benefit from larger numbers of threads working on different block devices. Even if the background flushing algorithm is radically changed, it is still likely that multiple threads will be involved and admins would still desire finer control on the min/max other than to have to recompile the kernel. The patch adds '/proc/sys/vm/nr_pdflush_threads_min' and '/proc/sys/vm/nr_pdflush_threads_max' with r/w permissions. The minimum value for nr_pdflush_threads_min is 1 and the maximum value is the current value of nr_pdflush_threads_max. This minimum is required since additional thread creation is performed in a pdflush thread itself. The minimum value for nr_pdflush_threads_max is the current value of nr_pdflush_threads_min and the maximum value can be 1000. Documentation/sysctl/vm.txt is also updated. [akpm@linux-foundation.org: fix comment, fix whitespace, use __read_mostly] Signed-off-by: Peter W Morreale <pmorreale@novell.com> Reviewed-by: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/sysctl/vm.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 3197fc83bc51..97c4b3284329 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -39,6 +39,8 @@ Currently, these files are in /proc/sys/vm:
39- nr_hugepages 39- nr_hugepages
40- nr_overcommit_hugepages 40- nr_overcommit_hugepages
41- nr_pdflush_threads 41- nr_pdflush_threads
42- nr_pdflush_threads_min
43- nr_pdflush_threads_max
42- nr_trim_pages (only if CONFIG_MMU=n) 44- nr_trim_pages (only if CONFIG_MMU=n)
43- numa_zonelist_order 45- numa_zonelist_order
44- oom_dump_tasks 46- oom_dump_tasks
@@ -463,6 +465,32 @@ The default value is 0.
463 465
464============================================================== 466==============================================================
465 467
468nr_pdflush_threads_min
469
470This value controls the minimum number of pdflush threads.
471
472At boot time, the kernel will create and maintain 'nr_pdflush_threads_min'
473threads for the kernel's lifetime.
474
475The default value is 2. The minimum value you can specify is 1, and
476the maximum value is the current setting of 'nr_pdflush_threads_max'.
477
478See 'nr_pdflush_threads_max' below for more information.
479
480==============================================================
481
482nr_pdflush_threads_max
483
484This value controls the maximum number of pdflush threads that can be
485created. The pdflush algorithm will create a new pdflush thread (up to
486this maximum) if no pdflush threads have been available for >= 1 second.
487
488The default value is 8. The minimum value you can specify is the
489current value of 'nr_pdflush_threads_min' and the
490maximum is 1000.
491
492==============================================================
493
466overcommit_memory: 494overcommit_memory:
467 495
468This value contains a flag that enables memory overcommitment. 496This value contains a flag that enables memory overcommitment.