Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f).
Subsystems (4)
PATCH 2/2 Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f).
With offline cpus no longer beeing seen in nohz mode (ts->idle_active=0), we don't need the check for cpu_online() introduced in commit 7386cdbf. Offline cpu's idle time as last recorded in its ts->idle_sleeptime will be reported (thus excluding its offline time as part of idle time statistics).
--- fs/proc/stat.c | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-)
fs/proc/stat.c +4 -10
@@ -45,13 +45,10 @@ static cputime64_t get_iowait_time(int cpu)static u64 get_idle_time (int cpu) { -u64 idle, idle_time =-1ULL ; - -if (cpu_online (cpu)) - idle_time =get_cpu_idle_time_us (cpu,NULL ); +u64 idle, idle_time =get_cpu_idle_time_us (cpu,NULL );if (idle_time ==-1ULL ) -/* !NO_HZ or cpu offline so we can rely on cpustat.idle */ +/* !NO_HZ so we can rely on cpustat.idle */ idle =kcpustat_cpu (cpu).cpustat[CPUTIME_IDLE ];else idle =usecs_to_cputime64 (idle_time);
@@ -61,13 +58,10 @@ static u64 get_idle_time(int cpu)static u64 get_iowait_time (int cpu) { -u64 iowait, iowait_time =-1ULL ; - -if (cpu_online (cpu)) - iowait_time =get_cpu_iowait_time_us (cpu,NULL ); +u64 iowait, iowait_time =get_cpu_iowait_time_us (cpu,NULL );if (iowait_time ==-1ULL ) -/* !NO_HZ or cpu offline so we can rely on cpustat.iowait */ +/* !NO_HZ so we can rely on cpustat.iowait */ iowait =kcpustat_cpu (cpu).cpustat[CPUTIME_IOWAIT ];else iowait =usecs_to_cputime64 (iowait_time);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Hello.
Quoted 2 lines · Srivatsa Vaddagiri
With offline cpus no longer beeing seen in nohz mode (ts->idle_active=0), we don't need the check for
cpu_online()introduced in commit7386cdbf. Offline
Please also specify the summary of that commit in parens (or however you
like).
Quoted 6 lines
cpu's idle time as last recorded in its
ts->idle_sleeptimewill be reported (thus excluding its offline time as part of idle time statistics).Cc mhocko at suse.czCc srivatsa.bhat at linux.vnet.ibm.comSigned-off-by Srivatsa Vaddagiri <[email protected]>
WBR, Sergei
Quoted 5 lines · Sergei Shtylyov
Quoted 2 lines
With offline cpus no longer beeing seen in nohz mode (ts->idle_active=0), we don't need the check for
cpu_online()introduced in commit7386cdbf. OfflinePlease also specify the summary of that commit in parens (or
however you like).
I had that in Subject line, but yes would be good to include in commit message as well. I will incorporate that change alongwith anything else required in next version of this patch.
- vatsa
Hello.
Quoted 9 lines · Srivatsa Vaddagiri
Quoted 5 lines
Quoted 2 lines
With offline cpus no longer beeing seen in nohz mode (ts->idle_active=0), we don't need the check for
cpu_online()introduced in commit7386cdbf. OfflinePlease also specify the summary of that commit in parens (or
however you like).I had that in Subject line, but yes would be good to include in commit message as well. I will incorporate that change alongwith anything else required in next version of this patch.
Ah, that was a revert with atypical subject -- didn't notice. Then there's no
need to specify it twice.
Quoted 1 line
- vatsa
WBR, Sergei