Add boot cache to kernel

From eLinux.org
Jump to: navigation, search
Summary
Add boot cache to kernel
Proposer
Tim Bird

Description

This proposal would be the creation and mainlining of a boot parameter cache for the Linux kernel.

The purpose of this cache would be to store values which are detected in one boot of the Linux kernel, so they can be quickly accessed and used on subsequent boots of the kernel, to reduce kernel initialization time (specifically, to avoid unneeded probing for non-changing hardware.)

The idea would be to provide an internal facility (API) inside the kernel that drivers could use to query for hardware parameters, prior to probing. If a value is found, then the probe can be avoided. If not, then probing is done as usual. It would be important to have a very unintrusive and easy-to-use API for this.

The mechanism would need to support a method of persistently storing the values for future kernel invocations (for example, by storing them in persistent memory, in a device tree, passing them on the kernel command line, or attaching them to the kernel boot image)

This can be seen as a generalization of the way probing/autodetection is avoided by using a command line parameter for loops_per_jiffy.

Andrew Murray proposed this under the name "boot cache", in August, 2010 to the kernel mailing list.

Related work

Scope

The mechanism could probably be developed in 4 to 8 weeks. Mainlining it might take 4 to 6 additional weeks.

Contractor Candidates

Comments