Benchmarks, scheduler instrumentation, PowerTop
Benchmarks, scheduler instrumentation, PowerTop
Posted Jul 25, 2007 13:37 UTC (Wed) by mingo (subscriber, #31122)In reply to: Con hit the nail on the head and ignored it by dion
Parent article: Interview with Con Kolivas (APC)
Con discovered what the Powertop people did; that anything that can be quantified will be improved.
Benchmarks like Con's interbench (a latency measurement test-suite) are very useful because they provide standardized metrics of system behavior and allow the precise tracking of them.
Instrumentation of latencies is an orthogonal thing, and it allows users to be involved much more directly - as PowerTop has proven.
Incidentally, i happened to be the one who wrote most of the kernel instrumentation code that enabled PowerTop (/proc/timer_stats, introduced upstream as part of dynticks) - and i'm quite impressed about the user-space tool, the phenomenon and the momentum that Arjan managed to build ontop of what i originally envisioned to be a raw, obscure, kernel-developers-only debugging feature.
So in CFS i've added various pieces of instrumentation to allow a powertop-like tool to be built: the scheduler now tracks worst-case blocking, worst-case sleeping latencies, how many times a task context-switched, etc.
Those stats are already used to report CFS regressions, but in addition to that a new tool could be written (lets call it "latencytop" :-) which would display the longest latencies that various tasks are observing. (or the tasks with the largest context-switch rate - etc.)
Enable CONFIG_SCHED_DEBUG for the new scheduler instrumentation code (all included in v2.6.23-rc1), the new stats are in /proc/[PID]/sched. These stats were very useful while developing CFS, nothing beats users being able to report: "my kmail just saw a 10.5 seconds latency while I built a kernel - Ingo you suck!".
