VM: move common VM settings to defconfig

file:696980eb06330fa57ecf7954f2aca96296285582 -> file:969e8fd65c81c8bda08d786208e5b10ede113e3e
--- 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"
file:0b51cfc9291a810f194b8b8ea01b2f58f80cb22b -> file:3236bf873a24aa6a64bdcb2f1e1a32f914800017
--- 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);
file:dc563788fa896c5f54ad244621161637f3663496 -> file:b12caa3423f00bcb20214aa317df11590d8c7609
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -1240,7 +1240,7 @@ int fat_add_entries(struct inode *dir, v
struct super_block *sb = dir->i_sb;
struct msdos_sb_info *sbi = MSDOS_SB(sb);
struct buffer_head *bh, *prev, *bhs[3]; /* 32*slots (672bytes) */
- struct msdos_dir_entry *de;
+ struct msdos_dir_entry *de = NULL;
int err, free_slots, i, nr_bhs;
loff_t pos, i_pos;
file:85542a7daf4012d2dffb7b7d4c86e0b6b917cb72 -> file:5c41494e6e8fbd5e135d011c2ef9e2a5c7e6f516
--- 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,
file:9f30530d110908131f5e5bf84efbda19a7992796 -> file:52c9596f2a2b0885cb4d20aae4ea262642dbde95
--- 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
file:955fe35d01e05da983fff97a0cc0902d3425774b -> file:21a7b3ef9f8458d4ba6b74be03e4cb395e217edc
--- 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.