Skip to content

RFC Automatice kernel tunables (AKT)

[email protected] lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Tunable structure and registration routinesDocumentation/00-INDEX Documentation/auto_tune.txt fs/Kconfig +8 more+890 -04 replies
2/6auto_tuning activationinclude/linux/akt.h kernel/exit.c kernel/fork.c+63 -00 replies
3/6tunables associated kobjectsinclude/linux/akt.h init/main.c kernel/autotune/Makefile +2 more+324 -40 replies
4/6min and max kobjectsinclude/linux/akt.h include/linux/akt_ops.h kernel/autotune/akt.c +1 more+469 -02 replies
5/6per namespace tunablesinclude/linux/akt.h kernel/autotune/akt.c+73 -191 reply
6/6automatic tuning applied to some kernel componentsfs/file_table.c include/linux/akt.h include/linux/ipc.h +4 more+218 -510 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/6] Automatice kernel tunables (AKT)

This is a series of patches that introduces a feature that makes the kernel automatically change the tunables values as it sees resources running out.

The AKT framework is made of 2 parts:

1) Kernel part:
Interfaces are provided to the kernel subsystems, to (un)register the tunables that might be automatically tuned in the future.

Registering a tunable consists in the following steps:
- a structure is declared and filled by the kernel subsystem for the registered tunable
- that tunable structure is registered into sysfs

Registration should be done during the kernel subsystem initialization step.

Another interface is provided to the kernel subsystems, to activate the automatic tuning for a registered tunable. It can be called during resource allocation to tune up, and during resource freeing to tune down the registered tunable. The automatic tuning routine is called only if the tunable has been enabled to be automatically tuning in sysfs.

2) User part:

AKT uses sysfs to enable the tunables management from the user world (mainly making them automatic or manual).

akt uses sysfs in the following way:
- a tunables subsystem (tunables_subsys) is declared and registered during akt initialization.
- registering a tunable is equivalent to registering the corresponding kobject within that subsystem.
- each tunable kobject has 3 associated attributes, all with a RW mode (i.e. the show() and store() methods are provided for them):
. autotune: enables to (de)activate automatic tuning for the tunable . max: enables to set a new maximum value for the tunable . min: enables to set a new minimum value for the tunable

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

These patches should be applied to 2.6.20-rc4, in the following order:

[PATCH 1/6]: tunables_registration.patch
[PATCH 2/6]: auto_tuning_activation.patch
[PATCH 3/6]: auto_tuning_kobjects.patch
[PATCH 4/6]: tunable_min_max_kobjects.patch
[PATCH 5/6]: per_namespace_tunables.patch
[PATCH 6/6]: auto_tune_applied.patch

--