diff options
-rw-r--r-- | Documentation/sysctl/vm.txt | 4 | ||||
-rw-r--r-- | kernel/sysctl.c | 5 |
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. | |||
90 | If dirty_bytes is written, dirty_ratio becomes a function of its value | 90 | If 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 | ||
93 | Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any | ||
94 | value lower than this limit will be ignored and the old configuration will be | ||
95 | retained. | ||
96 | |||
93 | ============================================================== | 97 | ============================================================== |
94 | 98 | ||
95 | dirty_expire_centisecs | 99 | dirty_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; | |||
103 | static int one_hundred = 100; | 103 | static int one_hundred = 100; |
104 | static int one_thousand = 1000; | 104 | static int one_thousand = 1000; |
105 | 105 | ||
106 | /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ | ||
107 | static 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 */ |
107 | static int maxolduid = 65535; | 110 | static int maxolduid = 65535; |
108 | static int minolduid; | 111 | static 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", |