Skip to content

Commit

Permalink
sched: fix sched_info_switch not being called according to documentation
Browse files Browse the repository at this point in the history
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: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
David Simner authored and Ingo Molnar committed May 5, 2008
1 parent b328ca1 commit 673a90a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -4662,9 +4662,9 @@ asmlinkage void __sched schedule(void)
prev->sched_class->put_prev_task(rq, prev);
next = pick_next_task(rq, prev);

sched_info_switch(prev, next);

if (likely(prev != next)) {
sched_info_switch(prev, next);

rq->nr_switches++;
rq->curr = next;
++*switch_count;
Expand Down

0 comments on commit 673a90a

Please sign in to comment.