From: eLinux.org
"Preset LPJ" is a feature to avoid the cost associated with calibrating loops_per_jiffy at each boot time.
The value of loops_per_jiffy (LPJ) is normally calculated in the routine calibrate_delay() early in the initialization sequence of the Linux kernel. The cost of doing this operation is independent of the CPU frequency and is about 250 milliseconds on most hardware. The value of LPJ should be the same for the same hardware operating at the same clock frequency. Thus LPJ can be calculated once and used for subsequent boots, and the cost to do the delay calibration can be avoided.
Basically, the patch allows you to specify a preset value for loops_per_jiffy at kernel compile time, or on the command line at kernel boot time.
The CELF patch was submitted to LKML on July 10, and was discussed here
This saves about 250 milliseconds on a 2.4-based Linux system. The duration of the calibration does not depend on the speed of the processor, but on the value of HZ for a particular architecture, and the number of iterations required to perform the calibration. For a 2.6 version of Linux, HZ is now defined as 1000 for the i386 platform (meaning a HZ duration is 1 millisecond rather than 10 milliseconds as it was for most architectures in the 2.4 version of the Linux kernel). Thus, for i386, the savings is now only about 25 milliseconds. However, many architectures still use a HZ value of 100, so for these architectures this change is still important.
The forum has written a specification for this feature. It is available at: [Calibrate Delay Avoidance Specification R2]. The specification page has more details about the operation of calibrate_delay() and the need for this feature.
A version of this feature is now included in official (Linus' tree) Linux version 2.6.9-rc2.
Boot your kernel
For kernels older than 2.6.9-rc2
**Turn on "Fast boot options"
**Turn on "Use preset loops_per_jiffy"
Reboot your kernel
Tim Bird (of Sony) measured the result of using preset lpj on his x86 desktop system. It saved 268 milliseconds of bootup time.
Details:
Richard Griffiths (of Intel) measured the result of using preset lpj on an x86 system. It saved about the same (~268 milliseconds) of bootup time.
Details:
Noboru Wakabayashi (of Hitachi) measured the result of using preset lpj on a TI OMAP (ARM-based) system. It saved about 212 milliseconds.
Tim Bird measured use of preset-lpj on an x86 desktop system with the 2.6.6 kernel. It saved 25 milliseconds.
Details:
With the new patch, Tim Bird got the following results:
**normal boot: calibrate_delay() took 23 milliseconds
**specifying lpj==xxx: calibrate_delay() took 43 microseconds.
**normal boot: calibrate_delay() took 264 milliseconds
**specifying lpj==xxx: calibrate_delay() took 43 microseconds.
Jyunji Kondo (of Fujitsu Prime Software Technologies) measured the result of using preset lpj on FR-V processor. It saved about 205 milliseconds.
Details:
Please also refer to the graphic chart in DMA Copy Of Kernel On Startup.
Here is a list of things that need to be done with this patch:
Testing performed for 2.6.7*for preset-lpj-5.patch (after LKML discussion)