lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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;

\
 
 \ /
  Last update: 2008-04-29 11:39    [W:0.032 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site