sched_info_switch not being called according to documentation (10545)
PATCH 1/1 sched_info_switch not being called according to documentation (10545)
Hi,
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, see the patch below:
David
kernel/sched.c +2 -2
@@ -3944,9 +3944,9 @@ 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;
Quoted 7 lines · David Simner
Hi,
http://bugzilla.kernel.org/show_bug.cgi?id=10545
sched_stats.hsays that__sched_info_switchis "called when prev != next" in the comment.sched.cshould therefore do that, see the patch below:
thanks David, applied you fix.
Ingo