From: Chad Goodman Date: Wed, 28 Nov 2012 10:38:58 +0000 (-0800) Subject: VM: move common VM settings to defconfig X-Git-Url: https://projects.ziggy471.com/git/gitweb.cgi?p=ziggy471-sgn2-jb.git;a=commitdiff;h=9e70927b4b2b409f01bfd59fee514a2517255c57 VM: move common VM settings to defconfig Signed-off-by: Ziggy --- --- a/fs/Kconfig +++ b/fs/Kconfig @@ -4,6 +4,11 @@ menu "File systems" +config VFS_CACHE_PRESSURE + int "vfs Cache Pressure" + default 70 + help + if BLOCK source "fs/ext2/Kconfig" --- a/fs/dcache.c +++ b/fs/dcache.c @@ -76,7 +76,7 @@ * dentry1->d_lock * dentry2->d_lock */ -int sysctl_vfs_cache_pressure __read_mostly = 100; +int sysctl_vfs_cache_pressure __read_mostly = CONFIG_VFS_CACHE_PRESSURE; EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure); static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dcache_lru_lock); --- a/fs/fuse/control.c +++ b/fs/fuse/control.c @@ -123,7 +123,7 @@ static ssize_t fuse_conn_max_background_ const char __user *buf, size_t count, loff_t *ppos) { - unsigned val; + unsigned val = 0; ssize_t ret; ret = fuse_conn_limit_write(file, buf, count, ppos, &val, @@ -160,7 +160,7 @@ static ssize_t fuse_conn_congestion_thre const char __user *buf, size_t count, loff_t *ppos) { - unsigned val; + unsigned val = 0; ssize_t ret; ret = fuse_conn_limit_write(file, buf, count, ppos, &val, --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1,3 +1,23 @@ +config VM_DIRTY_RATIO + int "vm_dirty_ratio" + default 15 + help + +config VM_DIRTY_BACKGROUND_RATIO + int "vm_dirty_background_ratio" + default 3 + help + +config VM_DIRTY_WRITBACK_INT + int "vm_dirty_writeback_interval" + default 500 + help + +config VM_DIRTY_EXPIRE_INT + int "vm_dirty_expure_interval" + default 3000 + help + config SELECT_MEMORY_MODEL def_bool y depends on EXPERIMENTAL || ARCH_SELECT_MEMORY_MODEL --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -61,7 +61,7 @@ static inline long sync_writeback_pages( /* * Start background writeback (via writeback threads) at this percentage */ -int dirty_background_ratio = 10; +int dirty_background_ratio = CONFIG_VM_DIRTY_BACKGROUND_RATIO; /* * dirty_background_bytes starts at 0 (disabled) so that it is a function of @@ -78,7 +78,7 @@ int vm_highmem_is_dirtyable; /* * The generator of dirty data starts writeback at this percentage */ -int vm_dirty_ratio = 20; +int vm_dirty_ratio = CONFIG_VM_DIRTY_RATIO; /* * vm_dirty_bytes starts at 0 (disabled) so that it is a function of @@ -89,12 +89,12 @@ unsigned long vm_dirty_bytes; /* * The interval between `kupdate'-style writebacks */ -unsigned int dirty_writeback_interval = 5 * 100; /* centiseconds */ +unsigned int dirty_writeback_interval = CONFIG_VM_DIRTY_WRITBACK_INT; /* centiseconds */ /* * The longest time for which data is allowed to remain dirty */ -unsigned int dirty_expire_interval = 30 * 100; /* centiseconds */ +unsigned int dirty_expire_interval = CONFIG_VM_DIRTY_EXPIRE_INT; /* centiseconds */ /* * Flag that makes the machine dump writes/reads and block dirtyings.