sched, trace: Fix sched_switch() prev_state argument
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 31 May 2010 16:13:25 +0000 (18:13 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 1 Jun 2010 07:27:17 +0000 (09:27 +0200)
commit02f726949f2be0967aa4871dd4e47d3967779b26
treecca72d10f5db4d5d2b37c0d3fb9c424fbef051ca
parente51fd5e22e12b39f49b1bb60b37b300b17378a43
sched, trace: Fix sched_switch() prev_state argument

For CONFIG_PREEMPT=y kernels the sched_switch(.prev_state) argument isn't
useful because we can get preempted with current->state != TASK_RUNNING
without actually getting removed from the runqueue.

Cure this by treating all preempted tasks as runnable from the tracer's
point of view.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cautiously-acked-by: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1275322715.27810.23323.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/trace/events/sched.h