• Peter W Morreale's avatar
    mm: add /proc controls for pdflush threads · fafd688e
    Peter W Morreale authored
    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: default avatarPeter W Morreale <pmorreale@novell.com>
    Reviewed-by: default avatarRik van Riel <riel@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    fafd688e
Name
Last commit
Last update
..
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...
allocpercpu.c Loading commit data...
backing-dev.c Loading commit data...
bootmem.c Loading commit data...
bounce.c Loading commit data...
debug-pagealloc.c Loading commit data...
dmapool.c Loading commit data...
fadvise.c Loading commit data...
failslab.c Loading commit data...
filemap.c Loading commit data...
filemap_xip.c Loading commit data...
fremap.c Loading commit data...
highmem.c Loading commit data...
hugetlb.c Loading commit data...
internal.h Loading commit data...
maccess.c Loading commit data...
madvise.c Loading commit data...
memcontrol.c Loading commit data...
memory.c Loading commit data...
memory_hotplug.c Loading commit data...
mempolicy.c Loading commit data...
mempool.c Loading commit data...
migrate.c Loading commit data...
mincore.c Loading commit data...
mlock.c Loading commit data...
mm_init.c Loading commit data...
mmap.c Loading commit data...
mmu_notifier.c Loading commit data...
mmzone.c Loading commit data...
mprotect.c Loading commit data...
mremap.c Loading commit data...
msync.c Loading commit data...
nommu.c Loading commit data...
oom_kill.c Loading commit data...
page-writeback.c Loading commit data...
page_alloc.c Loading commit data...
page_cgroup.c Loading commit data...
page_io.c Loading commit data...
page_isolation.c Loading commit data...
pagewalk.c Loading commit data...
pdflush.c Loading commit data...
percpu.c Loading commit data...
prio_tree.c Loading commit data...
quicklist.c Loading commit data...
readahead.c Loading commit data...
rmap.c Loading commit data...
shmem.c Loading commit data...
shmem_acl.c Loading commit data...
slab.c Loading commit data...
slob.c Loading commit data...
slub.c Loading commit data...
sparse-vmemmap.c Loading commit data...
sparse.c Loading commit data...
swap.c Loading commit data...
swap_state.c Loading commit data...
swapfile.c Loading commit data...
thrash.c Loading commit data...
truncate.c Loading commit data...
util.c Loading commit data...
vmalloc.c Loading commit data...
vmscan.c Loading commit data...
vmstat.c Loading commit data...