LVCool (Linux VCool) feature integrated in the kernel
-----------------------------------------------------

Laurent Latil <laurent@latil.nom.fr>
Martin Peters <mpet@bigfoot.de>
Volker Schmidt <vschmidt@unicum.de>

This feature allows to put your Duron/Athlon processor in a low power
consumption mode when the system is idle. That allows a major heat
reduction from the CPU (and longer battery life for notebooks).

You should note that this low power mode requires the CPU to be
disconnected from the CPU bus. This may have bad impact on some
applications (mainly for DMA transfer apparently).

A good information on this feature is available at http://www.vcool.de.


This feature has been developped thanks to the work of many developpers:
Martin Peters <mpet@bigfoot.de>, who wrote a port of his LVCool utility
to Linux (as a userland process). Then, Volker Schmidt created a small
patch to integrate the feature into the kernel.

Having this feature integrated in the kernel provides several benefits:
- No more 100% CPU load (as it is the case with the lvcool process)
- No more system slowdown (the lvcool process used some cycles, even when
the system load was high, slowing it down).
- No more problems with data transfer, as the feature is disabled on the
fly depending on the system load.

There are some drawbacks also:
- No control of the feature when kernel has booted. Impossible to disable
it after the boot for example (may be we could add this kind of control
in a /proc entry ?)
- Integration of not thoroughly tested code into your kernel, where it
can posibly do a lot of harm.


Compilation:
-----------

To compile this feature in the kernel, select it in the kernel configuration
tool. You need to select a Athlon/Duron/K7 processor family for this
feature to be available.

Note: As this feature uses a special Athlon/Duron processor state, it
is not available for other processor types.


Feature options:
---------------

Some options can be passed to the kernel through boot parameters to
tune this feature. You can add the following options to the kernel
command line:

	lvcool=off | [on],idle-thresold=t,idle-period=p

With:

	off:		Disable completely this feature.
	on:		Enable the feature (default)

	idle-thresold:	used to specify the idle percentage required to
			activate the feature. 't' is an integer value
			between	0 & 100.
			ie:	100 disable the feature,
				0 enable always the feature.
	idle-period:	used to set the periodicity to (re-)evaluate the
			idle percentage. 'p' is an integer value, 
			specifying the period (in seconds).


FAQ:  (I only guessed some typical questions currently)
---

Q: Why do my sound card play crippled sound ?

A: Because, while your preferred sound player program waits for the sound
card to play its buffer, lvcool disconnect the processor bus.
You should increase the idle-thresold, or the idle-period values (or both),
to prevent the 'lvcool' feature to disconnect the processor bus when
your processor is not really idle. 


Q: I compiled the feature in the kernel, rebooted, but the CPU temperature
didn't change (still at the same level it was without the 'LVCool' feature).
Why ?

A: First, ensure that the 'LVCool' feature has been enabled at the
boot process. For this, you can do a:
 
$ dmesg | grep 'lvcool'

If you don't have any result, that means your booted kernel does not
include the LVCool feature.
You can have some error report message as well  (Perhaps you have a
non-supported chipset and/or motherboard. Perhaps you do not have an
Athlon/Duron).

If you do not have any error at LVCool initialization, you should
check that your system is actually idle. Indeed, the feature is
disabled on the fly when the system is not idle.

You can also tune the idle-thresold, or the idle-period values.


Q: How can I make the LVCool feature cooling down the CPU, so reducing
power needs, as most as possible  (for a notebook for example)

A: Use a 0 idle-threshold value. This tells the LVCool feature to put the
CPU in low power mode each time the OS idle loop is entered, no matter
the current load of the system. Be aware that this can cause slowdown
of your system overally, and problems with DMA transfer to/from your
sound card / video grabber card, etc.

