[PATCH] schedstat: fix schedule() statistics
The number of times schedule() left the processor idle in the /proc/schedstat (runqueue.sched_goidle) seems to be wrong. The schedule() statistics should satisfy the equation: sched_cnt == sched_noswitch + sched_switch + sched_goidle (http://eaglet.rain.com/rick/linux/schedstat/v10/format-10.html) The below patch fix this, and I have confirmed to be fixed with: # grep ^cpu /proc/schedstat | awk '{print $6+$7+$9, $8}' Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment