]> git.kernelconcepts.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>
Mon, 5 Sep 2011 07:02:12 +0000 (17:02 +1000)
commit22b36689c74ef6e23203f864a236fe79f0d918ae
tree3b72c43662d4cfc9a23c765ded060dfdc0de6c5f
parent6ee96427e5cd1154e3161d3c77e982e1b6b0afb2
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