[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1274819573-18977-1-git-send-email-venki@google.com>
Date: Tue, 25 May 2010 13:32:53 -0700
From: Venkatesh Pallipadi <venki@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Linus Torvalds <torvalds@...l.org>,
LKML <linux-kernel@...r.kernel.org>, linux-arch@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Andi Kleen <andi@...stfloor.org>,
David Miller <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...e.de>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Venkatesh Pallipadi <venki@...gle.com>
Subject: Re: [patch 1/2] genirq: Run irq handlers with interrupts disabled
Just noticed a minor side effect of this patch on /proc/stat.
As int handlers run with ints disabled, timer interrupt based
samples will no longer account for any irq time. As a result, irq
time in /proc/stat, top, etc will be mostly zero (unless some handler
is enabling ints).
This is not a problem on s390, powerpc, ia64 when VIRT_CPU_ACCOUNTING is
enabled.
May be we should gracefully call it out as zero, with patch like below?
Signed-off-by: Venkatesh Pallipadi <venki@...gle.com>
---
Documentation/filesystems/proc.txt | 2 +-
fs/proc/stat.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 6507d2a..8f5254a 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1123,7 +1123,7 @@ second). The meanings of the columns are as follows, from left to right:
- system: processes executing in kernel mode
- idle: twiddling thumbs
- iowait: waiting for I/O to complete
-- irq: servicing interrupts
+- irq: servicing interrupts (valid only with VIRT_CPU_ACCOUNTING, 0 otherwise)
- softirq: servicing softirqs
- steal: involuntary wait
- guest: running a normal guest
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index bf31b03..d92bea8 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -46,7 +46,9 @@ static int show_stat(struct seq_file *p, void *v)
idle = cputime64_add(idle, kstat_cpu(i).cpustat.idle);
idle = cputime64_add(idle, arch_idle_time(i));
iowait = cputime64_add(iowait, kstat_cpu(i).cpustat.iowait);
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
irq = cputime64_add(irq, kstat_cpu(i).cpustat.irq);
+#endif
softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq);
steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal);
guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest);
@@ -87,7 +89,9 @@ static int show_stat(struct seq_file *p, void *v)
idle = kstat_cpu(i).cpustat.idle;
idle = cputime64_add(idle, arch_idle_time(i));
iowait = kstat_cpu(i).cpustat.iowait;
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
irq = kstat_cpu(i).cpustat.irq;
+#endif
softirq = kstat_cpu(i).cpustat.softirq;
steal = kstat_cpu(i).cpustat.steal;
guest = kstat_cpu(i).cpustat.guest;
--
1.7.0.1
--
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