[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1357268337-8025-1-git-send-email-vatsa@codeaurora.org>
Date: Thu, 3 Jan 2013 18:58:57 -0800
From: Srivatsa Vaddagiri <vatsa@...eaurora.org>
To: Russell King <linux@....linux.org.uk>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Stephen Boyd <sboyd@...eaurora.org>,
linux-arm-kernel@...ts.infradead.org,
Mike Frysinger <vapier@...too.org>,
uclinux-dist-devel@...ckfin.uclinux.org,
Ralf Baechle <ralf@...ux-mips.org>, linux-mips@...ux-mips.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
linuxppc-dev@...ts.ozlabs.org,
Martin Schwidefsky <schwidefsky@...ibm.com>,
linux-s390@...r.kernel.org, Paul Mundt <lethal@...ux-sh.org>,
linux-sh@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
sparclinux@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org, mhocko@...e.cz,
srivatsa.bhat@...ux.vnet.ibm.com
Cc: linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Srivatsa Vaddagiri <vatsa@...eaurora.org>
Subject: [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).
Cc: mhocko@...e.cz
Cc: srivatsa.bhat@...ux.vnet.ibm.com
Signed-off-by: Srivatsa Vaddagiri <vatsa@...eaurora.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists