mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Acked-by: Balbir Singh <[email protected]> Cc: Luck Tony <[email protected]> Cc: Shailabh Nagar <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Shailabh Nagar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3d9e0cf1fe
commit
d57af9b214
5 changed files with 21 additions and 23 deletions
|
|
@ -56,10 +56,10 @@ typedef u64 cputime64_t;
|
|||
#define jiffies64_to_cputime64(__jif) ((__jif) * (NSEC_PER_SEC / HZ))
|
||||
|
||||
/*
|
||||
* Convert cputime <-> milliseconds
|
||||
* Convert cputime <-> microseconds
|
||||
*/
|
||||
#define cputime_to_msecs(__ct) ((__ct) / NSEC_PER_MSEC)
|
||||
#define msecs_to_cputime(__msecs) ((__msecs) * NSEC_PER_MSEC)
|
||||
#define cputime_to_usecs(__ct) ((__ct) / NSEC_PER_USEC)
|
||||
#define usecs_to_cputime(__usecs) ((__usecs) * NSEC_PER_USEC)
|
||||
|
||||
/*
|
||||
* Convert cputime <-> seconds
|
||||
|
|
|
|||
Loading…
Reference in a new issue