[patch] sched_info_switch not being called according todocumentation (10545)

From: David Simner
Date: Tue Apr 29 2008 - 05:37:10 EST


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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/