nohz: stat: Fix CPU idle time accounting
authorBo Yan <byan@nvidia.com>
Fri, 22 Mar 2013 21:03:26 +0000 (14:03 -0700)
committerRiham Haidar <rhaidar@nvidia.com>
Tue, 26 Mar 2013 05:53:49 +0000 (22:53 -0700)
commite7a9220f5883bf3816e24895a34239a34a7d9ece
tree9ae6f0a84f6ea5b8670261b093da82e6cacd12d9
parentf1af9df69fba43ac27cdad51191f4043a648149a
nohz: stat: Fix CPU idle time accounting

Since cpustat[CPUTIME_IDLE] is never connected to ts->idle_sleeptime,
never read from cpustat[CPUTIME_IDLE] when reporting stats in
/proc/stat.

Note this was rejected by Michal Hocko when it was initially proposed
by Martin Schwidefsky in LKML, so if you want to upstream it, better
find an alternative (either completely disable cpustat[CPUTIME_IDLE]
for CONFIG_NO_HZ or somehow connect them to keep them in sync.)

bug 1190321

Change-Id: Idc92488910b826aff850a010016d8326c7ab9e6c
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/212224
Reviewed-by: Liang Cheng (SW) <licheng@nvidia.com>
Tested-by: Liang Cheng (SW) <licheng@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
fs/proc/stat.c
kernel/time/tick-sched.c