aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
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 /arch/s390
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 'arch/s390')
-rw-r--r--arch/s390/include/asm/cputime.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index 8b1a52a137c5..40e2ab0fa3f0 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -73,18 +73,18 @@ cputime64_to_jiffies64(cputime64_t cputime)
73} 73}
74 74
75/* 75/*
76 * Convert cputime to milliseconds and back. 76 * Convert cputime to microseconds and back.
77 */ 77 */
78static inline unsigned int 78static inline unsigned int
79cputime_to_msecs(const cputime_t cputime) 79cputime_to_usecs(const cputime_t cputime)
80{ 80{
81 return cputime_div(cputime, 4096000); 81 return cputime_div(cputime, 4096);
82} 82}
83 83
84static inline cputime_t 84static inline cputime_t
85msecs_to_cputime(const unsigned int m) 85usecs_to_cputime(const unsigned int m)
86{ 86{
87 return (cputime_t) m * 4096000; 87 return (cputime_t) m * 4096;
88} 88}
89 89
90/* 90/*