aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2007-10-29 16:18:11 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-29 16:18:11 -0400
commit73a2bcb0edb9ffb0b007b3546b430e2c6e415eee (patch)
treedd84f61589c7dd21b7be973c288611ffe547f21b /kernel
parentf7402e0361d4472535e07cfca648f2fa81d85cd2 (diff)
sched: keep utime/stime monotonic
keep utime/stime monotonic. cpustats use utime/stime as a ratio against sum_exec_runtime, as a consequence it can happen - when the ratio changes faster than time accumulates - that either can be appear to go backwards. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index ddafdfac9456..a65bfc47177c 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1056,6 +1056,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1056 p->gtime = cputime_zero; 1056 p->gtime = cputime_zero;
1057 p->utimescaled = cputime_zero; 1057 p->utimescaled = cputime_zero;
1058 p->stimescaled = cputime_zero; 1058 p->stimescaled = cputime_zero;
1059 p->prev_utime = cputime_zero;
1059 1060
1060#ifdef CONFIG_TASK_XACCT 1061#ifdef CONFIG_TASK_XACCT
1061 p->rchar = 0; /* I/O counter: bytes read */ 1062 p->rchar = 0; /* I/O counter: bytes read */