aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sysctl/vm.txt4
-rw-r--r--kernel/sysctl.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 97c4b3284329..b716d33912d8 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -90,6 +90,10 @@ will itself start writeback.
90If dirty_bytes is written, dirty_ratio becomes a function of its value 90If dirty_bytes is written, dirty_ratio becomes a function of its value
91(dirty_bytes / the amount of dirtyable system memory). 91(dirty_bytes / the amount of dirtyable system memory).
92 92
93Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any
94value lower than this limit will be ignored and the old configuration will be
95retained.
96
93============================================================== 97==============================================================
94 98
95dirty_expire_centisecs 99dirty_expire_centisecs
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index e3d2c7dd59b9..ea78fa101ad6 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -103,6 +103,9 @@ static unsigned long one_ul = 1;
103static int one_hundred = 100; 103static int one_hundred = 100;
104static int one_thousand = 1000; 104static int one_thousand = 1000;
105 105
106/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
107static unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
108
106/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ 109/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
107static int maxolduid = 65535; 110static int maxolduid = 65535;
108static int minolduid; 111static int minolduid;
@@ -1006,7 +1009,7 @@ static struct ctl_table vm_table[] = {
1006 .mode = 0644, 1009 .mode = 0644,
1007 .proc_handler = &dirty_bytes_handler, 1010 .proc_handler = &dirty_bytes_handler,
1008 .strategy = &sysctl_intvec, 1011 .strategy = &sysctl_intvec,
1009 .extra1 = &one_ul, 1012 .extra1 = &dirty_bytes_min,
1010 }, 1013 },
1011 { 1014 {
1012 .procname = "dirty_writeback_centisecs", 1015 .procname = "dirty_writeback_centisecs",