]> git.baikalelectronics.ru Git - kernel.git/commit
nohz: Fix update_ts_time_stat idle accounting
authorMichal Hocko <mhocko@suse.cz>
Wed, 24 Aug 2011 07:37:48 +0000 (09:37 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 8 Sep 2011 09:10:55 +0000 (11:10 +0200)
commit178d8f53c07631bfb7edbb0bfc23728f3d2a55d6
tree7556787053d608134184d98413cce744d54507fc
parentfe0302fd35bd833e57a1955506cc598ee9f36546
nohz: Fix update_ts_time_stat idle accounting

update_ts_time_stat currently updates idle time even if we are in
iowait loop at the moment. The only real users of the idle counter
(via get_cpu_idle_time_us) are CPU governors and they expect to get
cumulative time for both idle and iowait times.
The value (idle_sleeptime) is also printed to userspace by print_cpu
but it prints both idle and iowait times so the idle part is misleading.

Let's clean this up and fix update_ts_time_stat to account both counters
properly and update consumers of idle to consider iowait time as well.
If we do this we might use get_cpu_{idle,iowait}_time_us from other
contexts as well and we will get expected values.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Dave Jones <davej@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Link: http://lkml.kernel.org/r/e9c909c221a8da402c4da07e4cd968c3218f8eb1.1314172057.git.mhocko@suse.cz
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_ondemand.c
kernel/time/tick-sched.c