X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fsched_stats.h;h=80179ef7450e95684f9d3f0221fce3b32615bbd5;hb=f36b7a2c170ff1dbbb38d235817e04020b196950;hp=5bae2e0c3ff293b665e0428ce2942c6e9ac1db0b;hpb=904e0ab54b7591b9cb01cfc0dbbedcc8bc0d949b;p=linux-2.6 diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index 5bae2e0c3f..80179ef745 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h @@ -67,6 +67,7 @@ static int show_schedstat(struct seq_file *seq, void *v) preempt_enable(); #endif } + kfree(mask_str); return 0; } @@ -197,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) { @@ -205,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); } /*