aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
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 'include/linux')
-rw-r--r--include/linux/sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3c07d595979f..b0b1fe6e0b17 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1009,6 +1009,7 @@ struct task_struct {
1009 unsigned int rt_priority; 1009 unsigned int rt_priority;
1010 cputime_t utime, stime, utimescaled, stimescaled; 1010 cputime_t utime, stime, utimescaled, stimescaled;
1011 cputime_t gtime; 1011 cputime_t gtime;
1012 cputime_t prev_utime;
1012 unsigned long nvcsw, nivcsw; /* context switch counts */ 1013 unsigned long nvcsw, nivcsw; /* context switch counts */
1013 struct timespec start_time; /* monotonic time */ 1014 struct timespec start_time; /* monotonic time */
1014 struct timespec real_start_time; /* boot based time */ 1015 struct timespec real_start_time; /* boot based time */