Commit 673a90a1 authored by David Simner's avatar David Simner Committed by Ingo Molnar

sched: fix sched_info_switch not being called according to documentation

http://bugzilla.kernel.org/show_bug.cgi?id=10545

sched_stats.h says that __sched_info_switch is "called when prev !=
next" in the comment.  sched.c should therefore do that.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b328ca18
...@@ -4662,9 +4662,9 @@ asmlinkage void __sched schedule(void) ...@@ -4662,9 +4662,9 @@ asmlinkage void __sched schedule(void)
prev->sched_class->put_prev_task(rq, prev); prev->sched_class->put_prev_task(rq, prev);
next = pick_next_task(rq, prev); next = pick_next_task(rq, prev);
sched_info_switch(prev, next);
if (likely(prev != next)) { if (likely(prev != next)) {
sched_info_switch(prev, next);
rq->nr_switches++; rq->nr_switches++;
rq->curr = next; rq->curr = next;
++*switch_count; ++*switch_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment