* [PATCH 2/2] Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f).
@ 2013-01-04 2:58 Srivatsa Vaddagiri
2013-01-04 12:13 ` Sergei Shtylyov
0 siblings, 1 reply; 4+ messages in thread
From: Srivatsa Vaddagiri @ 2013-01-04 2:58 UTC (permalink / raw)
To: Russell King, Paul E. McKenney, Stephen Boyd, linux-arm-kernel,
Mike Frysinger, uclinux-dist-devel, Ralf Baechle, linux-mips,
Benjamin Herrenschmidt, linuxppc-dev, Martin Schwidefsky,
linux-s390, Paul Mundt, linux-sh, David S. Miller, sparclinux,
Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, mhocko,
srivatsa.bhat
Cc: linux-arm-msm, Srivatsa Vaddagiri, linux-kernel
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).
Cc: mhocko@suse.cz
Cc: srivatsa.bhat@linux.vnet.ibm.com
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
---
fs/proc/stat.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index e296572..64c3b31 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -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);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f).
2013-01-04 2:58 [PATCH 2/2] Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f) Srivatsa Vaddagiri
@ 2013-01-04 12:13 ` Sergei Shtylyov
2013-01-04 19:29 ` Srivatsa Vaddagiri
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2013-01-04 12:13 UTC (permalink / raw)
To: Srivatsa Vaddagiri
Cc: linux-mips, linux-sh, mhocko, H. Peter Anvin, sparclinux,
linux-s390, Russell King, x86, Ingo Molnar, Paul E. McKenney,
Mike Frysinger, linux-arm-msm, Thomas Gleixner, linux-arm-kernel,
Stephen Boyd, linux-kernel, Ralf Baechle, Paul Mundt,
srivatsa.bhat, Martin Schwidefsky, uclinux-dist-devel,
linuxppc-dev, David S. Miller
Hello.
On 04-01-2013 6:58, Srivatsa Vaddagiri wrote:
> 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
Please also specify the summary of that commit in parens (or however you
like).
> 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).
> Cc: mhocko@suse.cz
> Cc: srivatsa.bhat@linux.vnet.ibm.com
> Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f).
2013-01-04 12:13 ` Sergei Shtylyov
@ 2013-01-04 19:29 ` Srivatsa Vaddagiri
2013-01-04 20:42 ` Sergei Shtylyov
0 siblings, 1 reply; 4+ messages in thread
From: Srivatsa Vaddagiri @ 2013-01-04 19:29 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: linux-mips, linux-sh, mhocko, H. Peter Anvin, sparclinux,
linux-s390, Russell King, x86, Ingo Molnar, Paul E. McKenney,
Mike Frysinger, linux-arm-msm, Thomas Gleixner, linux-arm-kernel,
Stephen Boyd, linux-kernel, Ralf Baechle, Paul Mundt,
srivatsa.bhat, Martin Schwidefsky, uclinux-dist-devel,
linuxppc-dev, David S. Miller
* Sergei Shtylyov <sshtylyov@mvista.com> [2013-01-04 16:13:42]:
> >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
>
> Please 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f).
2013-01-04 19:29 ` Srivatsa Vaddagiri
@ 2013-01-04 20:42 ` Sergei Shtylyov
0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2013-01-04 20:42 UTC (permalink / raw)
To: Srivatsa Vaddagiri
Cc: linux-mips, linux-sh, mhocko, H. Peter Anvin, sparclinux,
linux-s390, Russell King, x86, Ingo Molnar, Paul E. McKenney,
Mike Frysinger, linux-arm-msm, Thomas Gleixner, linux-arm-kernel,
Stephen Boyd, linux-kernel, Ralf Baechle, Paul Mundt,
srivatsa.bhat, Martin Schwidefsky, uclinux-dist-devel,
linuxppc-dev, David S. Miller
Hello.
On 01/04/2013 10:29 PM, Srivatsa Vaddagiri wrote:
>>> 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
>> Please 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.
> - vatsa
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-04 19:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 2:58 [PATCH 2/2] Revert "nohz: Fix idle ticks in cpu summary line of /proc/stat" (commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f) Srivatsa Vaddagiri
2013-01-04 12:13 ` Sergei Shtylyov
2013-01-04 19:29 ` Srivatsa Vaddagiri
2013-01-04 20:42 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).