diff --git a/[refs] b/[refs] index 3d41aafbdcfa..5787a2ae2dc2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d819c49da624e3ee09b2844603d58265039eecdd +refs/heads/master: d4abc238c9f4df8b3216f3e883f5d0a07b7ac75a diff --git a/trunk/kernel/sched_stats.h b/trunk/kernel/sched_stats.h index a38878e0e49d..80179ef7450e 100644 --- a/trunk/kernel/sched_stats.h +++ b/trunk/kernel/sched_stats.h @@ -198,6 +198,9 @@ static inline void sched_info_queued(struct task_struct *t) /* * Called when a process ceases being the active-running process, either * voluntarily or involuntarily. Now we can calculate how long we ran. + * Also, if the process is still in the TASK_RUNNING state, call + * sched_info_queued() to mark that it has now again started waiting on + * the runqueue. */ static inline void sched_info_depart(struct task_struct *t) { @@ -206,6 +209,9 @@ static inline void sched_info_depart(struct task_struct *t) t->sched_info.cpu_time += delta; rq_sched_info_depart(task_rq(t), delta); + + if (t->state == TASK_RUNNING) + sched_info_queued(t); } /*