aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2010-10-27 18:34:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:17 -0400
commitd57af9b2142f31a39dcfdeb30776baadfc802827 (patch)
treea89233b1e57b152c9bebf7bb516dd51920602969 /include/asm-generic
parent3d9e0cf1fe007b88db55d43dfdb6839e1a029ca5 (diff)
taskstats: use real microsecond granularity for CPU times
The taskstats interface uses microsecond granularity for the user and system time values. The conversion from cputime to the taskstats values uses the cputime_to_msecs primitive which effectively limits the granularity to milliseconds. Add the cputime_to_usecs primitive for architectures that have better, more precise CPU time values. Remove cputime_to_msecs primitive because there are no more users left. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Luck Tony <tony.luck@intel.com> Cc: Shailabh Nagar <nagar1234@in.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Shailabh Nagar <nagar@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/cputime.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h
index ca0f239f0e13..2bcc5c7c22a6 100644
--- a/include/asm-generic/cputime.h
+++ b/include/asm-generic/cputime.h
@@ -33,10 +33,10 @@ typedef u64 cputime64_t;
33 33
34 34
35/* 35/*
36 * Convert cputime to milliseconds and back. 36 * Convert cputime to microseconds and back.
37 */ 37 */
38#define cputime_to_msecs(__ct) jiffies_to_msecs(__ct) 38#define cputime_to_usecs(__ct) jiffies_to_usecs(__ct);
39#define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs) 39#define usecs_to_cputime(__msecs) usecs_to_jiffies(__msecs);
40 40
41/* 41/*
42 * Convert cputime to seconds and back. 42 * Convert cputime to seconds and back.