add /proc/sys/kernel/cache_decay_ticks

David Mosberger (davidm@napali.hpl.hp.com)
Wed, 18 Jun 2003 14:51:22 -0700


/proc/sys/kernel/cache_decay_ticks allows runtime tuning of the
scheduler. The earlier patch collided with the C99-ification of the
file, so here is a retransmit.

--david

diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h
--- a/include/linux/sysctl.h Wed Jun 18 13:32:49 2003
+++ b/include/linux/sysctl.h Wed Jun 18 13:32:49 2003
@@ -130,6 +130,7 @@
KERN_PIDMAX=55, /* int: PID # limit */
KERN_CORE_PATTERN=56, /* string: pattern for core-file names */
KERN_PANIC_ON_OOPS=57, /* int: whether we will panic on an oops */
+ KERN_CACHEDECAYTICKS=58, /* ulong: value for cache_decay_ticks (EXPERIMENTAL!) */
};


diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c
--- a/kernel/sysctl.c Wed Jun 18 13:32:49 2003
+++ b/kernel/sysctl.c Wed Jun 18 13:32:49 2003
@@ -551,6 +551,16 @@
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+#ifdef CONFIG_SMP
+ {
+ .ctl_name = KERN_CACHEDECAYTICKS,
+ .procname = "cache_decay_ticks",
+ .data = &cache_decay_ticks,
+ .maxlen = sizeof(cache_decay_ticks),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ },
+#endif
{ .ctl_name = 0 }
};

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/