diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2010-10-27 18:34:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:17 -0400 |
commit | d57af9b2142f31a39dcfdeb30776baadfc802827 (patch) | |
tree | a89233b1e57b152c9bebf7bb516dd51920602969 /arch/ia64/include | |
parent | 3d9e0cf1fe007b88db55d43dfdb6839e1a029ca5 (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 'arch/ia64/include')
-rw-r--r-- | arch/ia64/include/asm/cputime.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/include/asm/cputime.h b/arch/ia64/include/asm/cputime.h index 7fa8a8594660..6073b187528a 100644 --- a/arch/ia64/include/asm/cputime.h +++ b/arch/ia64/include/asm/cputime.h | |||
@@ -56,10 +56,10 @@ typedef u64 cputime64_t; | |||
56 | #define jiffies64_to_cputime64(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) | 56 | #define jiffies64_to_cputime64(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Convert cputime <-> milliseconds | 59 | * Convert cputime <-> microseconds |
60 | */ | 60 | */ |
61 | #define cputime_to_msecs(__ct) ((__ct) / NSEC_PER_MSEC) | 61 | #define cputime_to_usecs(__ct) ((__ct) / NSEC_PER_USEC) |
62 | #define msecs_to_cputime(__msecs) ((__msecs) * NSEC_PER_MSEC) | 62 | #define usecs_to_cputime(__usecs) ((__usecs) * NSEC_PER_USEC) |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * Convert cputime <-> seconds | 65 | * Convert cputime <-> seconds |