Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ck: revert time accounting "fix" that produced time anomalies with 'ps'

  • Loading branch information...
commit d4ea811726fd0aaa88311bcbe5b8cec5cd06c794 1 parent 9e03ec6
@damentz damentz authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 kernel/sched/bfs.c
View
8 kernel/sched/bfs.c
@@ -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 = rtime;
+ u64 temp;
- temp *= utime;
+ temp = (u64)(rtime * utime);
do_div(temp, total);
utime = (cputime_t)temp;
} else
@@ -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 = rtime;
+ u64 temp;
- temp *= cputime.utime;
+ temp = (u64)(rtime * cputime.utime);
do_div(temp, total);
utime = (cputime_t)temp;
} else
Please sign in to comment.
Something went wrong with that request. Please try again.