linux/fs/proc
Andreas Schwab 34845636a1 procfs: do not confuse jiffies with cputime64_t
Commit 2a95ea6c0d ("procfs: do not overflow get_{idle,iowait}_time
for nohz") did not take into account that one some architectures jiffies
and cputime use different units.

This causes get_idle_time() to return numbers in the wrong units, making
the idle time fields in /proc/stat wrong.

Instead of converting the usec value returned by
get_cpu_{idle,iowait}_time_us to units of jiffies, use the new function
usecs_to_cputime64 to convert it to the correct unit of cputime64_t.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Artem S. Tashkinov" <t.artem@mailcity.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-12-29 16:31:57 -08:00
..
array.c
base.c Revert "proc: fix races against execve() of /proc/PID/fd**" 2011-11-09 18:16:00 -05:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
generic.c filesystems: add set_nlink() 2011-11-02 12:53:43 +01:00
inode.c filesystems: add set_nlink() 2011-11-02 12:53:43 +01:00
internal.h
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile
meminfo.c fs/proc/meminfo.c: fix compilation error 2011-12-09 07:50:28 -08:00
mmu.c
namespaces.c
nommu.c
page.c
proc_devtree.c
proc_net.c proc: make struct proc_dir_entry::name a terminal array rather than a pointer 2011-07-27 12:50:45 -07:00
proc_sysctl.c Merge branch 'akpm' (Andrew's incoming - part two) 2011-11-02 16:07:27 -07:00
proc_tty.c
root.c procfs: fix a vfsmount longterm reference leak 2011-12-09 00:40:19 -05:00
softirqs.c
stat.c procfs: do not confuse jiffies with cputime64_t 2011-12-29 16:31:57 -08:00
task_mmu.c mm: distinguish between mlocked and pinned pages 2011-10-31 17:30:46 -07:00
task_nommu.c
uptime.c
version.c
vmcore.c fs: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros 2011-10-31 19:30:31 -04:00