Linux Scheduler Statistics
/proc/schedstat format
/proc/schedstat format
version 2
This version contains fields that will be zero unless certain patches and
config options have been utilized. These are noted below. CONFIG_NUMA will
not be available as a config option except in the -mjb trees, which,
from 2.5.62 forward,
already have this schedstat patch incorporated. -mjb trees can be obtained
at http:/www.aracnet.com/~fletch/linux.
Format for version 2 of schedstat:
tag 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
tag is cpuN or totals.
NOTE: |
In the sched_yield() statistics,
the active queue is considered empty if it has only one process
in it, since obviously the process calling sched_yield() is that process.
|
First four are sched_yield() statistics:
- # of times both the active and the expired queue were empty
- # of times just the active queue was empty
- # of times just the expired queue was empty
- # of times sched_yield() was called
Next three are schedule() statistics:
- # of times the active queue had at least one other process on it.
- # of times we switched to the expired queue and reused it
- # of times schedule() was called
Next seven are statistics dealing with load_balance()
(requires CONFIG_SMP):
- # of times load_balance() was called at an idle tick
- # of times load_balance() was called at a busy tick
- # of times load_balance() was called from schedule()
- # of times load_balance() was called
- sum of imbalances discovered (if any) with each call to load_balance()
- # of times load_balance() was called when we did not find a "busiest" queue
- # of times load_balance() was called from balance_node() (requires CONFIG_NUMA)
Next four are statistics dealing with pull_task() (requires CONFIG_SMP):
- # of times pull_task() moved a task to this cpu
- # of times pull_task() stole a task from this cpu
- # of times pull_task() moved a task to this cpu from another node (requires CONFIG_NUMA and 2.5.65 or later)
- # of times pull_task() stole a task from this cpu for another node (requires CONFIG_NUMA and 2.5.65 or later)
Last two are statistics dealing with balance_node() (requires CONFIG_SMP and CONFIG_NUMA):
- # of times balance_node() was called
- # of times balance_node() was called at an idle tick
Questions to ricklind@us.ibm.com