]> git.baikalelectronics.ru Git - kernel.git/commit
nohz: Make idle/iowait counter update conditional
authorMichal Hocko <mhocko@suse.cz>
Wed, 24 Aug 2011 07:39:30 +0000 (09:39 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 8 Sep 2011 09:10:55 +0000 (11:10 +0200)
commitf7a148312b51b5166bd35b17bfabac4d6ab8ae25
tree5de69591f64e995737a62cf26d8bb3a927b27d79
parent178d8f53c07631bfb7edbb0bfc23728f3d2a55d6
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