]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
nohz: stat: Fix decreasing idle/iowait times
authorSai Gurrappadi <sgurrappadi@nvidia.com>
Wed, 4 Jun 2014 00:46:23 +0000 (17:46 -0700)
committerDhiren Parmar <dparmar@nvidia.com>
Mon, 27 Oct 2014 14:02:48 +0000 (07:02 -0700)
commit1416e155cbd4ed0347c73042c257e9fff68a8046
tree78e5fc5ec36cf495399b395e72e9975e37ece86e
parent6bf66bc7113c30b524ae96ef78ccedf99ead7bd2
nohz: stat: Fix decreasing idle/iowait times

Always read nohz idle/iowait counters if nohz is enabled even if the cpu
is offline. This prevents a decreasing counter if a reader reads
/proc/stat before and after a cpu is offlined. Currently /proc/stat
switches between using the nohz counters and the sched-tick counters
both of which are updated independently and could therefore be out of
sync.

Commit "7386cdb nohz: Fix idle ticks in cpu summary line of /proc/stat"
introduced the check to fall back onto using the sched-tick counters
because the nohz counters updated incorrectly when a cpu was offlined.
However, commit "4b0c0f2 tick: Cleanup NOHZ per cpu data on cpu down"
properly fixes the issue by clearing nohz state on cpu-down thereby
preventing faulty nohz counter updates. So we can now safely remove the
cpu_online() checks introduced by 7386cdb.

Bug 200007081
Bug 1512875

Change-Id: I7182f2cc9f36e2019c72522f76cac44a59e8b913
Reviewed-on: http://git-master/r/384495
(cherry picked from commit e08c1abfbe4d7c140185fc3483eabb6645adfa58)
Signed-off-by: Gaurav Singh <gauravsingh@nvidia.com>
Reviewed-on: http://git-master/r/558218
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
fs/proc/stat.c