]> git.karo-electronics.de Git - karo-tx-linux.git/commit
get_cpu_{idle,iowait}_time_us update idle/iowait counters unconditionally
authorMichal Hocko <mhocko@suse.cz>
Wed, 24 Aug 2011 23:46:23 +0000 (09:46 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 31 Aug 2011 04:27:21 +0000 (14:27 +1000)
commit532b5cd97d63ec81f060bd7cc84f0f28d063d021
tree05ac4108734c6d9eb8c3e197a04dc3ee53f6017b
parentc857cfc943320d254181ab76a29f020923749e02
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.

Let's update those counters only if the given last_update_time parameter
is non-NULL which means that the caller is interested in updating.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Dave Jones <davej@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/time/tick-sched.c