PrincetonUniversity
     



PLATYPUS KERNEL and GPHT LKM:


We have used a Linux 2.6.11 kernel to develop the runtime GPHT phase perdictor and phase-driven dynamic power management via DVFS. Below are the tarball for the whole kernel source tree and the loadable kernel module (LKM) where all the performance monitoring, phase predictions and DVFS setting actions take place.

You still need to modify the kernel a little bit to make use of the module afterwards, that's why we have the kernel included as well. First, 2.6 kernel doesn't export the syscall table, so we need to export it. The LKM inclusion is somewhat different as well from 2.4 kernels (i.e. modules are .ko files now instead of .o), so we had some more changes for them as well. Third, most importantly, to have the instruction based sampling and phase definitions, we needed to add our interrupt handler (and a dummy handler for when the module is not loaded) to the local vector table (LVT) and interrupt descriptor table entries (IDT) in the kernel.

More details on the specific kernel edits will follow here if someone requests them, so let us know...(-G-)

BEWARE!!, the DVFS settings are for our experimental platform for the 6 DVFS settings from 600MHz to 1500MHz. Intel has separate mappings for different implementations for the DVFS mode set registers (MSR_IA32_PERF_CTL). I had implemented the mappings for two Pentium-M systems we had the laptop with 600-1500MHz and a development board with 600-1600MHz - see the switch sys_set_target_f(unsigned freq). If you have a different platform, you may need to modify the DVFS mappings in: "CANO_PHASE_DVFS_LKM.h" [#define MSRVALUE(mhz, mv) ( ( ((mhz)/100)<<8 ) | ( ((mv) -700)/16 ) )].


Downloads:

Our Linux 2.6.11 source
This is the kernel source tree (72MB). If you use ctags, i had made the tags for this kernel so you can track where some of the things we use are defined. THESE (73MB) are the ctags.

The LKM for GPHT and Phase-Driven Dynamic Management
This is the main LKM. GPHT predictions are defined inside the interrupt handler: "void new_perf_handler(struct pt_regs *regs)". It does all the performance monitoring, phase translations, parallel port signaling and DVFS settings (I have described these somewhat in the micro paper in the big schematic figure). Note that power measurements are done with the DAQ and on a separate machine with LabView, if you are interested in those as well let us know.

This is the first include file for the LKM
This include file has the systems calls and other required definitions for the user level.

This is the second include file for the LKM
This one has the performance counter event definitions for instructions retired and BUS_TRAN_MEM and several others we had played with.

Makefile for the LKM

User level example
This is a user level example to run an application and how we talk to the LKM. LKM runs by itself, but this is useful for evaluations. THIS is the makefile to compile it.

THIS is a simple program to set/test frequencies and THIS is the makefile for it.

Example Script
This is a simple script to show how we can run each SPEC CPU2000 benchmark 5 times and collect the GPHT results.

 

 
 
 
Department of Electrical Engineering
 
Last Update: Tue, Dec 10, 2006 7:07  
           
-