]> 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>
Fri, 9 Sep 2011 06:16:03 +0000 (16:16 +1000)
commitb2ed411cf486bdacdabae36200a251a2e6dc5d68
tree9da6b5452c0b7f43349f4eed84260b8446d7cfa3
parent4b3753289a662e9f724cdc86dc058b22a20d0090
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