public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] sched_info_switch not being called according to documentation (10545)
@ 2008-04-29  9:08 David Simner
  2008-04-29  9:51 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: David Simner @ 2008-04-29  9:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-29  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29  9:08 [patch] sched_info_switch not being called according to documentation (10545) David Simner
2008-04-29  9:51 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox