LongRunHowTo

Revision 1 as of 2005-09-27 15:27:07

Clear message

LongRun HOWTO

This page is dedicated to making Ubuntu Linux take advantage and control LongRun enabled processors -- most notably the Crusoe(TM) processors from [http://www.transmeta.com/ Transmeta(TM)]. This HOWTO was written to explain certain things regarding the longrun utility and how to get it to work on Unbuntu Hoary.

NOTE: Tips may work on previous versions of Ubuntu Linux, however testing would be necessary to confirm their effectivenes.

Requirements

To be able to make use of the LongRun functionality of the Transmeta(TM) Crusoe(TM) family of processors on Ubuntu Linux, there are certain requirements especially in the kernel drivers. These are the following:

  • CPUID device driver
  • MSR device driver
  • `longrun package (available from the universe repository)

The first two device drivers may be loaded from the default Ubuntu packaged Linux Kernel by issuing the following commands from the terminal (or the shell):

sudo modprobe cpuid
sudo modprobe msr

The longrun utility is provided by the `longrun package from universe:

sudo apt-get install longrun

Command Index

There are five operations which can be done using the longrun utility to enable, configure, disable, and query the LongRun settings for the processor. These are:

  • Listing LongRun information about available performance levels for the processor.

  • Printing the current LongRun settings and status

  • Setting the LongRun mode flag

  • Configuring the current LongRun performance window

  • Setting the current LongRun Thermal Extensions setting

These operations are enumerated in depth in the following sections.

The basic format for the longrun command is as follows:

longrun -c ''cpuid device'' -m ''msr device'' ''command flag'' (''command options'')

CPUID device pertains to the device created and associated with the CPUID device driver -- and which works the same for the MSR device, created and associated with the MSR device driver. Usually, on uniprocessor systems, CPUID and MSR devices for the one and only processor are the following files respectively:

/dev/cpu/0/cpuid
/dev/cpu/0/msr

When used in the longrun function, it usually looks like the following:

sudo longrun -c /dev/cpu/0/cpuid -m /dev/cpu/0/msr ...

The '0' (zero) pertains to the cpu id which you want to be able to control with the utility. In cases where there are more than one LongRun capable processor in the system, the each one gets a cpu id. For example, in a dual-Crusoe(TM) system, the second processor is accessed using the following device(s):

/dev/cpu/1/cpuid
/dev/cpu/1/msr

NOTE: To be able to perform these operations, make sure that the appropriate drivers have been loaded and that the `longrun is installed in the system. See above for information about installing required packages and loaded device drivers.

Displaying current settings and status.

The following command can be used to display the current settings and status:

sudo longrun -c /dev/0/cpuid -m /dev/0/msr -p

Which would yield something similar to this:

LongRun: enabled
LongRun Thermal Extensions (LTX): inactive
Current performance window: 0 to 100
Current performance level: 66
LongRun flags: economy

Listing Available LongRun Performance Level Information

To see the available performance levels for the processor, the following command should show that information on the terminal/command line:

sudo longrun -c /dev/cpu/0/cpuid -m /dev/cpu/0/msr -l

Typical outputs look like the following:

# %   MHz  Volts  usage  SDR  DDR  PCI
  0   300  1.200  0.281  100   75   33
 33   400  1.250  0.407  100   80   33
 66   500  1.400  0.638  125  100   33
100   600  1.600  1.000  120  100   33

The above values are obtained from a Transmeta(TM) Crusoe(TM) Processor TM5600, installed on an ECS Desknote A530 (See [HardwareSupportMachinesECS] for more information).

The significant values of note are the values on the first colum, which defines the possible values for the performance window.

Configuring the Current Performance Window

Given the values from the available performance levels, setting the current performance window (minimum and maximum levels) may be done using the following command:

sudo longrun -c /dev/cpu/0/cpuid -m /dev/cpu/0/msr -s 0 100

When the current settings and status are displayed, the output should be similar to the following:

sudo longrun -c /dev/cpu/0/cpuid -m /dev/cpu/0/msr -p
LongRun: enabled
LongRun Thermal Extensions (LTX): inactive
Current performance window: 0 to 100
Current performance level: 100
LongRun flags: economy

'TODO: Explain performance window and its effect on the performance of the processor.