diff options
author | Balbir Singh <balbir@linux.vnet.ibm.com> | 2007-07-09 18:52:00 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-07-09 18:52:00 +0200 |
commit | 172ba844a8851c3edd13c0a979cdf46bd5e3cc1a (patch) | |
tree | 5e1bfd820c8e68fc28450688f166f4136351e1e1 /kernel/delayacct.c | |
parent | b27f03d4bdc145a09fb7b0c0e004b29f1ee555fa (diff) | |
download | linux-172ba844a8851c3edd13c0a979cdf46bd5e3cc1a.tar.gz linux-172ba844a8851c3edd13c0a979cdf46bd5e3cc1a.tar.bz2 linux-172ba844a8851c3edd13c0a979cdf46bd5e3cc1a.zip |
sched: update delay-accounting to use CFS's precise stats
update delay-accounting to use CFS's precise stats.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/delayacct.c')
-rw-r--r-- | kernel/delayacct.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/delayacct.c b/kernel/delayacct.c index c0148ae992c4..81e697829633 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c @@ -99,9 +99,10 @@ void __delayacct_blkio_end(void) int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) { s64 tmp; - struct timespec ts; - unsigned long t1,t2,t3; + unsigned long t1; + unsigned long long t2, t3; unsigned long flags; + struct timespec ts; /* Though tsk->delays accessed later, early exit avoids * unnecessary returning of other data @@ -124,11 +125,10 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) d->cpu_count += t1; - jiffies_to_timespec(t2, &ts); - tmp = (s64)d->cpu_delay_total + timespec_to_ns(&ts); + tmp = (s64)d->cpu_delay_total + t2; d->cpu_delay_total = (tmp < (s64)d->cpu_delay_total) ? 0 : tmp; - tmp = (s64)d->cpu_run_virtual_total + (s64)jiffies_to_usecs(t3) * 1000; + tmp = (s64)d->cpu_run_virtual_total + t3; d->cpu_run_virtual_total = (tmp < (s64)d->cpu_run_virtual_total) ? 0 : tmp; |