Messages in this thread Patch in this message | | | Date | Tue, 29 Apr 2008 10:08:59 +0100 | From | David Simner <> | Subject | [patch] 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
--- linux-2.6.25-old/kernel/sched.c 2008-04-17 03:49:44.000000000 +0100 +++ linux-2.6.25/kernel/sched.c 2008-04-29 10:54:11.000000000 +0100 @@ -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;
| |