]> 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>
Tue, 13 Sep 2011 06:19:15 +0000 (16:19 +1000)
commit47b92088d9019dfea865d5f2e9429c80947dce21
tree48398806e4dd331e1c47c4161afad7134c09f201
parentf6556f582427d30919c79089c9955db7e42e4fd8
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