diff options
-rw-r--r-- | kernel/sched_stats.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index a38878e0e49d..80179ef7450e 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h | |||
@@ -198,6 +198,9 @@ static inline void sched_info_queued(struct task_struct *t) | |||
198 | /* | 198 | /* |
199 | * Called when a process ceases being the active-running process, either | 199 | * Called when a process ceases being the active-running process, either |
200 | * voluntarily or involuntarily. Now we can calculate how long we ran. | 200 | * voluntarily or involuntarily. Now we can calculate how long we ran. |
201 | * Also, if the process is still in the TASK_RUNNING state, call | ||
202 | * sched_info_queued() to mark that it has now again started waiting on | ||
203 | * the runqueue. | ||
201 | */ | 204 | */ |
202 | static inline void sched_info_depart(struct task_struct *t) | 205 | static inline void sched_info_depart(struct task_struct *t) |
203 | { | 206 | { |
@@ -206,6 +209,9 @@ static inline void sched_info_depart(struct task_struct *t) | |||
206 | 209 | ||
207 | t->sched_info.cpu_time += delta; | 210 | t->sched_info.cpu_time += delta; |
208 | rq_sched_info_depart(task_rq(t), delta); | 211 | rq_sched_info_depart(task_rq(t), delta); |
212 | |||
213 | if (t->state == TASK_RUNNING) | ||
214 | sched_info_queued(t); | ||
209 | } | 215 | } |
210 | 216 | ||
211 | /* | 217 | /* |