Andreas Schwab
34845636a1
procfs: do not confuse jiffies with cputime64_t
...
Commit 2a95ea6c0d129b4 ("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
..
2011-07-26 16:49:46 -07:00
2009-07-27 12:10:38 -07:00
2009-06-15 13:27:38 +10:00
2009-06-12 11:32:58 +02:00
2011-07-26 16:49:48 -07:00
2011-05-04 14:41:28 -04:00
2011-05-04 14:41:28 -04:00
2011-05-04 14:41:28 -04:00
2011-05-04 14:41:28 -04:00
2009-06-11 21:02:15 +02:00
2011-03-23 19:46:22 -07:00
2009-06-11 21:02:14 +02:00
2011-10-31 17:30:54 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:50 +02:00
2011-05-25 08:39:37 -07:00
2011-11-01 07:34:21 -07:00
2010-10-07 14:08:55 +01:00
2008-02-07 08:42:30 -08:00
2011-12-29 16:31:57 -08:00
2009-06-11 21:02:37 +02:00
2011-07-22 18:45:33 +02:00
2009-07-22 00:28:38 +02:00
2008-05-01 08:03:58 -07:00
2008-06-30 12:51:05 +02:00
2010-08-11 08:59:21 -07:00
2011-10-31 17:30:44 -07:00
2009-06-11 21:02:42 +02:00
2011-03-17 13:08:27 -03:00
2009-06-11 21:02:37 +02:00
2011-08-19 13:25:34 -04:00
2011-03-17 09:19:04 +08:00
2011-03-11 12:23:31 +01:00
2009-06-11 21:02:17 +02:00
2011-10-26 23:15:28 +02:00
2010-10-07 14:08:55 +01:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:14 +02:00
2009-06-11 21:02:14 +02:00
2011-07-22 18:46:26 +02:00
2008-08-12 16:07:31 -07:00
2011-02-17 14:16:30 -08:00
2011-07-25 10:32:42 -07:00
2009-06-11 21:02:15 +02:00
2010-12-17 15:07:19 +01:00
2009-06-11 21:02:37 +02:00
2010-10-07 14:08:55 +01:00
2010-08-14 22:26:51 +02:00
2010-08-14 22:26:51 +02:00
2010-10-09 21:51:44 +02:00
2010-05-25 08:07:03 -07:00
2009-06-11 21:02:37 +02:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-08-17 13:00:20 -07:00
2011-01-13 17:32:47 -08:00
2009-09-22 07:17:41 -07:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2008-10-23 09:18:20 -07:00
2008-10-23 09:18:20 -07:00
2009-06-11 21:02:37 +02:00
2011-10-31 17:30:48 -07:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2011-07-12 11:13:07 -05:00
2010-03-12 15:52:42 -08:00
2009-09-09 13:29:18 -07:00
2010-09-10 10:56:51 +02:00
2009-06-11 21:02:50 +02:00
2009-07-27 12:10:38 -07:00
2009-07-27 12:10:38 -07:00
2011-06-15 20:04:00 -07:00
2009-06-11 21:02:15 +02:00
2011-05-26 17:12:36 -07:00
2011-05-25 08:39:43 -07:00
2009-06-11 21:02:18 +02:00
2011-11-01 07:34:20 -07:00
2010-05-27 09:12:54 -07:00
2011-03-08 17:22:11 +01:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2011-03-31 11:26:23 -03:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2011-03-17 09:19:04 +08:00
2009-10-12 13:26:31 -07:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2010-11-01 15:31:29 -04:00
2010-08-09 16:48:44 -04:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2009-09-22 19:56:50 -07:00
2010-08-18 12:12:38 -07:00
2011-07-25 20:57:14 -07:00
2010-08-10 13:47:39 -07:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2011-05-25 08:39:20 -07:00
2009-06-11 21:02:50 +02:00
2010-08-09 20:44:57 -07:00
2011-03-22 17:44:09 -07:00
2009-06-11 21:02:17 +02:00
2011-03-17 09:19:05 +08:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2011-12-03 15:31:48 -05:00
2011-03-01 15:49:39 +01:00
2009-06-11 21:02:42 +02:00
2011-10-24 21:00:34 +02:00
2011-05-20 12:50:29 -07:00