On Tue, 16 Jan 2007 07:15:17 +0100 Nadia.Derbey@xxxxxxxx wrote:<snip>
[PATCH 01/06]
+Any kernel subsystem that has registered a tunable should call
+auto_tune_func() as follows:
+
++-------------------------+--------------------------------------------+
+| Step | Routine to call |
++-------------------------+--------------------------------------------+
+| Declaration phase | DEFINE_TUNABLE(name, values...); |
++-------------------------+--------------------------------------------+
+| Initialization routine | set_tunable_min_max(name, min, max); |
+| | set_autotuning_routine(name, routine); |
+| | register_tunable(&name); |
+| Note: the 1st 2 calls | |
+| are optional | |
++-------------------------+--------------------------------------------+
+| Alloc | activate_auto_tuning(AKT_UP, &name); |
++-------------------------+--------------------------------------------+
+| Free | activate_auto_tuning(AKT_DOWN, &name); |
So does Free always use AKT_DOWN? why does it matter?
Seems unneeded and inconsistent.
How does one activate a tunable for downward adjustment?
+
+2) User part:
+
+As seen above, the only way to activate automatic tuning is from user side:
+- the directory /sys/tunables is created during the init phase.
+- each time a tunable is registered by a kernel subsystem, a directory is
+created for it under /sys/tunables.
+- This directory contains 1 file for each tunable kobject attribute:
Please try to limit text documentation to 80 columns or less.
Index: linux-2.6.20-rc4/fs/Kconfig
===================================================================
--- linux-2.6.20-rc4.orig/fs/Kconfig 2007-01-15 13:08:14.000000000 +0100
+++ linux-2.6.20-rc4/fs/Kconfig 2007-01-15 14:20:20.000000000 +0100
@@ -925,6 +925,8 @@ config PROC_KCORE
bool "/proc/kcore support" if !ARM
depends on PROC_FS && MMU
+source "kernel/autotune/Kconfig"
Why is that is the File systems menu? Seems odd to me
for it to be there. If it's just because it depends on
PROC_FS and SYSFS, then it should just go completely after
the File systems menu.
Index: linux-2.6.20-rc4/include/linux/akt.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.20-rc4/include/linux/akt.h 2007-01-15 14:26:24.000000000 +0100
@@ -0,0 +1,186 @@
+
+ char flags; /* Only 2 bits are meaningful: */
Make flags unsigned char so that no sign bit is needed.
+ /* bit 0: set to 1 if the associated tunable can */
+ /* be automatically adjusted */
+ /* bits 1: set to 1 if the tunable has been */
+ /* registered */
+ /* bits 2-7: useless */
unused ??
+
+extern void fork_late_init(void);
Looks like the wrong header file for that extern.