nohz: Make idle/iowait counter update conditional
commit09a1d34f8535ecf9a347ea76f7597730c2bc0c8d
authorMichal Hocko <mhocko@suse.cz>
Wed, 24 Aug 2011 07:39:30 +0000 (24 09:39 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 8 Sep 2011 09:10:55 +0000 (8 11:10 +0200)
tree5de69591f64e995737a62cf26d8bb3a927b27d79
parent6beea0cda8ce71c01354e688e5735c47e331e84f
nohz: Make idle/iowait counter update conditional

get_cpu_{idle,iowait}_time_us update idle/iowait counters
unconditionally if the given CPU is in the idle loop.

This doesn't work well outside of CPU governors which are singletons
so nobody (except for IRQ) can race with them.

We will need to use both functions from /proc/stat handler to properly
handle nohz idle/iowait times.

Make the update depend on a non NULL last_update_time argument.

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/11f23179472635ce52e78921d47a20216b872f23.1314172057.git.mhocko@suse.cz
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/time/tick-sched.c