Name: msr Version: 15 Kernelver: 2.2.7 Status: 7 Author: Richard Gooch Description: Model-Specific Register and Performance Monitor Counter driver Date: 5-MAY-1999 Descfile-URL: ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/kernel-patches/v2.2/msr.desc Download-URL: ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/kernel-patches/v2.2/msr-patch-current.gz Homepage-URL: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html Manual-URL: http://www.atnf.csiro.au/~rgooch/linux/docs/msr.txt MSRs are Model-Specific Registers which provide access to internal processor functions and allow you to control the behaviour of the processor. While the set of MSRs is highly model-dependent, there is a reasonably generic interface which may be used to read and write these registers. This patch creates the /dev/cpu/msr device file. By using ioctl() functions on this device you can read and write specified MSRs. Many processors provide special Performance Monitoring Counters (PMCs) for the purposes of system or application tuning. You can usually count mundane events such as the number of floating point multiplies, to more exotic events such as the number of cache misses when reading data. If you have a programme which is not running as fast as you expected, performance monitoring can provide useful insights. The patch creates the /dev/cpu/perfmon%u device files (one file per performance counter). A separate user space library is available from: http://www.atnf.csiro.au/~rgooch/linux/ which provides a simple and convenient interface to the device drivers. The MSR interface mimics the interface to MSRs available in the kernel, making it possible to develop MSR drivers in user space. In addition, header files are provided which have symbolic definitions for the event codes for some processor models. Also in this patch is an ioctl() on /proc//mem to translate virtual addresses to physical addresses and an ioctl() to enable page colouring on anonymous pages (stack and heap pages). This patch requires the devfs and mtrr patches.