summaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-06-02 03:39:16 -0700
committerBen Collins <bcollins@debian.org>2003-06-02 03:39:16 -0700
commit088ed5a57e92164098fe093f967124535de2c2f8 (patch)
tree0bc6e687f3f6042af0da28928fabefa114d93907 /kernel/sysctl.c
parenta0fc2217b78648e5d1afc1b85bc09d50d0a0b874 (diff)
[PATCH] dirty_writeback_centisecs fixes
This /proc tunable sets the kupdate interval. It has a couple of problems: - No way to turn it off completely (userspace dirty memory management solutions require this). - If it has been set to one hour and then the user resets it to five seconds, that resetting will not take effect for up to an hour. Fix that up by providing a sysctl handler. Setting the tunable to zero now disables the kupdate function.
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4d8785e94e8e..f4f9a14971af 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -271,7 +271,6 @@ static ctl_table kern_table[] = {
/* Constants for minimum and maximum testing in vm_table.
We use these as one-element integer vectors. */
static int zero = 0;
-static int one = 1;
static int one_hundred = 100;
@@ -292,20 +291,7 @@ static ctl_table vm_table[] = {
&sysctl_intvec, NULL, &zero, &one_hundred },
{VM_DIRTY_WB_CS, "dirty_writeback_centisecs",
&dirty_writeback_centisecs, sizeof(dirty_writeback_centisecs), 0644,
- NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL,
- /* Here, we define the range of possible values for
- dirty_writeback_centisecs.
-
- The default value is 5 seconds (500 centisec). We will use 1
- centisec, the smallest possible value that could make any sort of
- sense. If we allowed the user to set the interval to 0 seconds
- (which would presumably mean to chew up all of the CPU looking for
- dirty pages and writing them out, without taking a break), the
- interval would effectively become 1 second (100 centisecs), due to
- some nicely documented throttling code in wb_kupdate().
-
- There is no maximum legal value for dirty_writeback. */
- &one , NULL},
+ NULL, dirty_writeback_centisecs_handler },
{VM_DIRTY_EXPIRE_CS, "dirty_expire_centisecs",
&dirty_expire_centisecs, sizeof(dirty_expire_centisecs), 0644,
NULL, &proc_dointvec},