Skip to content

Commit

Permalink
ck: revert time accounting "fix" that produced time anomalies with 'ps'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Barrett committed Dec 29, 2012
1 parent 9e03ec6 commit d4ea811
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/sched/bfs.c
Expand Up @@ -7491,9 +7491,9 @@ void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
rtime = nsecs_to_cputime(p->sched_time); rtime = nsecs_to_cputime(p->sched_time);


if (total) { if (total) {
u64 temp = rtime; u64 temp;


temp *= utime; temp = (u64)(rtime * utime);
do_div(temp, total); do_div(temp, total);
utime = (cputime_t)temp; utime = (cputime_t)temp;
} else } else
Expand Down Expand Up @@ -7524,9 +7524,9 @@ void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
rtime = nsecs_to_cputime(cputime.sum_exec_runtime); rtime = nsecs_to_cputime(cputime.sum_exec_runtime);


if (total) { if (total) {
u64 temp = rtime; u64 temp;


temp *= cputime.utime; temp = (u64)(rtime * cputime.utime);
do_div(temp, total); do_div(temp, total);
utime = (cputime_t)temp; utime = (cputime_t)temp;
} else } else
Expand Down

0 comments on commit d4ea811

Please sign in to comment.