aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorBart Samwel <bart@samwel.tk>2006-03-24 06:15:48 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:20 -0500
commitf6ef943813ac3085ece7252ea101d663581219f6 (patch)
treee32d3e57ba6ae235ec1f510b16d77fe9bfa8f96e /kernel/sysctl.c
parent36f574135e36b86bb6ae794bf1d0fce3efa5601f (diff)
[PATCH] Represent dirty_*_centisecs as jiffies internally
Make that the internal values for: /proc/sys/vm/dirty_writeback_centisecs /proc/sys/vm/dirty_expire_centisecs are stored as jiffies instead of centiseconds. Let the sysctl interface do the conversions with full precision using clock_t_to_jiffies, instead of doing overflow-sensitive on-the-fly conversions every time the values are used. Cons: apparent precision loss if HZ is not a multiple of 100, because of conversion back and forth. This is a common problem for all sysctl values that use proc_dointvec_userhz_jiffies. (There is only one other in-tree use, in net/core/neighbour.c.) Signed-off-by: Bart Samwel <bart@samwel.tk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 32b48e8ee36e..817ba25517eb 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -742,18 +742,18 @@ static ctl_table vm_table[] = {
742 { 742 {
743 .ctl_name = VM_DIRTY_WB_CS, 743 .ctl_name = VM_DIRTY_WB_CS,
744 .procname = "dirty_writeback_centisecs", 744 .procname = "dirty_writeback_centisecs",
745 .data = &dirty_writeback_centisecs, 745 .data = &dirty_writeback_interval,
746 .maxlen = sizeof(dirty_writeback_centisecs), 746 .maxlen = sizeof(dirty_writeback_interval),
747 .mode = 0644, 747 .mode = 0644,
748 .proc_handler = &dirty_writeback_centisecs_handler, 748 .proc_handler = &dirty_writeback_centisecs_handler,
749 }, 749 },
750 { 750 {
751 .ctl_name = VM_DIRTY_EXPIRE_CS, 751 .ctl_name = VM_DIRTY_EXPIRE_CS,
752 .procname = "dirty_expire_centisecs", 752 .procname = "dirty_expire_centisecs",
753 .data = &dirty_expire_centisecs, 753 .data = &dirty_expire_interval,
754 .maxlen = sizeof(dirty_expire_centisecs), 754 .maxlen = sizeof(dirty_expire_interval),
755 .mode = 0644, 755 .mode = 0644,
756 .proc_handler = &proc_dointvec, 756 .proc_handler = &proc_dointvec_userhz_jiffies,
757 }, 757 },
758 { 758 {
759 .ctl_name = VM_NR_PDFLUSH_THREADS, 759 .ctl_name = VM_NR_PDFLUSH_THREADS,