Skip to content

Commit

Permalink
Revert "ck: revert time accounting "fix" that produced time anomalies…
Browse files Browse the repository at this point in the history
… with 'ps'"

Did not fix ps issues.

This reverts commit d4ea811.
  • Loading branch information
Steven Barrett committed Dec 31, 2012
1 parent d4ea811 commit 1475190
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/sched/bfs.c
Original file line number Diff line number Diff line change
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);

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

temp = (u64)(rtime * utime);
temp *= utime;
do_div(temp, total);
utime = (cputime_t)temp;
} 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);

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

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

0 comments on commit 1475190

Please sign in to comment.