diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 10:16:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 10:16:10 -0700 |
commit | a21e40877ad130de837b0394583e4f68dc2ab6c5 (patch) | |
tree | c990fba6ef5f2ed464c906615c5c327f2d02b318 /include/linux/cputime.h | |
parent | b9b16a792241e304834f43e2a5f02e6e43576f09 (diff) | |
parent | 073d8224d299528778e90773becd1e890953443c (diff) |
Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Ingo Molnar:
"The main purpose is to fix a full dynticks bug related to
virtualization, where steal time accounting appears to be zero in
/proc/stat even after a few seconds of competing guests running busy
loops in a same host CPU. It's not a regression though as it was
there since the beginning.
The other commits are preparatory work to fix the bug and various
cleanups"
* 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
arch: Remove stub cputime.h headers
sched: Remove needless round trip nsecs <-> tick conversion of steal time
cputime: Fix jiffies based cputime assumption on steal accounting
cputime: Bring cputime -> nsecs conversion
cputime: Default implementation of nsecs -> cputime conversion
cputime: Fix nsecs_to_cputime() return type cast
Diffstat (limited to 'include/linux/cputime.h')
-rw-r--r-- | include/linux/cputime.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/cputime.h b/include/linux/cputime.h new file mode 100644 index 00000000000..f2eb2ee535c --- /dev/null +++ b/include/linux/cputime.h @@ -0,0 +1,16 @@ +#ifndef __LINUX_CPUTIME_H +#define __LINUX_CPUTIME_H + +#include <asm/cputime.h> + +#ifndef cputime_to_nsecs +# define cputime_to_nsecs(__ct) \ + (cputime_to_usecs(__ct) * NSEC_PER_USEC) +#endif + +#ifndef nsecs_to_cputime +# define nsecs_to_cputime(__nsecs) \ + usecs_to_cputime((__nsecs) / NSEC_PER_USEC) +#endif + +#endif /* __LINUX_CPUTIME_H */ |