[PATCH 0/6] AKT - Automatic Kernel Tunables



Re-sending the series of patches for the automatic kernel tunables feature:
have done some fixes after the remarks sent back by Andrew and Randy.

1) All the type independent macros have been removed, except for the automatic
tuning routine: it manages pointers to the tunable and to the value to be
checked against that tunable, so it should rmain type independent IMHO.
Now, I only left the auto-tuning routines for types int and size_t since these
are the types of the tunables the framework is applied to.
It will be easy to add the other types as needed in the future.
This makes the code much lighter.

2) CONFIG_AKT has been moved from the FS menu to the "general setup" one.

+ all the other minor changes.


--- Reminder

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


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



Relevant Pages

  • Re: [RFC][PATCH 6/6] automatic tuning applied to some kernel components
    ... The following kernel components register a tunable structure and call the ... shared memory (per namespace) ... The ipc tunables have been selected as "guinea-pig" tunables for the AKT framework because they are likely to be often used in data bases. ... to make a system correctly react to eventual peak loads for a given resource usage, i.e. make it tune up *and down* as needed. ...
    (Linux-Kernel)
  • Re: [Security] [patch] random: make get_random_int() more random
    ... So tunables are really counter-productive - and this is a pet peeve ... not improved the kernel, we've documented a _failure_ in kernel ... Please read the FAQ at http://www.tux.org/lkml/ ... Let the kernel use that for a high quality RNG. ...
    (Linux-Kernel)
  • RE: Kernel tuning for large maxsockets
    ... True, I can add a tunable for each of tcp, udp, raw, divert. ... What will happen when the system runs out of pcbs? ... Kernel tuning for large maxsockets ... I'd prefer separate tunables. ...
    (freebsd-net)
  • Re: [RFC][PATCH 1/6] Tunable structure and registration routines
    ... information needed by the adjustment routine for a given tunable. ... The fork kernel component defines a tunable structure for the threads-max ... +tunables that might be automatically tuned in the future. ...
    (Linux-Kernel)
  • [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. ... Registering a tunable consists in the following steps: ... Registration should be done during the kernel subsystem initialization step. ...
    (Linux-Kernel)