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>
This commit is contained in:

committed by
Ingo Molnar

parent
f7402e0361
commit
73a2bcb0ed
@@ -1056,6 +1056,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
||||
p->gtime = cputime_zero;
|
||||
p->utimescaled = cputime_zero;
|
||||
p->stimescaled = cputime_zero;
|
||||
p->prev_utime = cputime_zero;
|
||||
|
||||
#ifdef CONFIG_TASK_XACCT
|
||||
p->rchar = 0; /* I/O counter: bytes read */
|
||||
|
Reference in New Issue
Block a user