It adds lots of CPU scheduler stats in /proc/pid/stat. They are described in
the new Documentation//sched-stats.txt
We were carrying this patch offline for some time, but as there's still
considerable ongoing work in this area, and as the new stats are a
configuration option, I think it's best that this capability be in the base
kernel.
Nick removed a fair amount of statistics that he wasn't using. The full patch
gathers more information. In particular, his patch doesn't include the code
to measure the latency between the time a process is made runnable and the
time it hits a processor which will be key to measuring interactivity changes.
He passed his changes back to me and I got finished merging his changes with
the current statistics patches just before OLS. I believe this is largely a
superset of the patch you grabbed and should port relatively easily too.
Versions also exist for
2.6.8-rc2
2.6.8-rc2-mm1
2.6.8-rc2-mm2
at
http://eaglet.rain.com/rick/linux/schedstat/patches/
- moved the new /proc/<PID>/stat fields to /proc/<PID>/schedstat,
because the new fields break older procps. It's cleaner this way
anyway. This moving of fields necessiated a bump to version 10.
Documentation/sched-stats.txt:
- updated sched-stats.txt for version 10
- wake_up_forked_thread() => wake_up_new_task()
- updated the per-process field description
Kconfig:
- removed the default y and made the option dependent on DEBUG_KERNEL.
This is really for scheduler analysis, normal users dont need the
overhead.
include/linux/sched.h:
- moved the definitions into kernel/sched.c - this fixes UP compilation
and is cleaner.
- also moved the sched-domain definitions to sched.c - now that the
sched-domains internals are not exposed to architectures this is
doable. It's also necessary due to the previous change.
kernel/fork.c:
- moved the ->sched_info init to sched_fork() where it belongs.