Linux Operating System Source Code: IBM Patches

 
Scheduler Statistics Patch
Description:

This patch installs code in the Linux kernel that will collect scheduler statistics and make the statistics available through the proc file system (/proc/sstat). The patch can be useful when evaluating changes to the Linux scheduler source code. The patch is currently on the 2.3.46 IA32 kernel (should be easy to add support for other architectures). The patch supports both UNI and SMP kernels. For SMP, statistics are reported on a per processor basis in addition to a total for all processors.

Each time the statistics are read (e.g. cat /proc/sstat), the statistics are reset so that statistics reported are since the last time they were read. This makes it convenient to run a workload and then collect the statistics after the workload completes.

cat /proc/sstat > before0.dat # reset statistics
run workload
cat /proc/sstat > after0.dat # get statistics

The patch installs an option ("IBM Scheduler Statistics support") in config.in so the patch can be turned on and off. The option appears below the "Kernel Hacking" option which is is located on the main page of the Linux Kernel Configuration tool near the bottom. The option is defaulted to "off".

The patch also supports the P6 family performance-monitoring counters by allowing the performance-monitoring events to be selected through the proc file system (/proc/perfcntr0 and /proc/perfcntr1). The counter values are included in the statistics that are reported through /proc/sstat.

Developer:
Bill Hartner
Status:
Available from IBM
Release Notes Date Files
20000225 Release Notes 2000-02-02  
      sstat_1.0_2.3.46.tar.gz