From: Venkatesh Pallipadi <venki@google.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Andi Kleen <andi@firstfloor.org>,
David Miller <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@suse.de>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Venkatesh Pallipadi <venki@google.com>
Subject: Re: [patch 1/2] genirq: Run irq handlers with interrupts disabled
Date: Tue, 25 May 2010 13:32:53 -0700 [thread overview]
Message-ID: <1274819573-18977-1-git-send-email-venki@google.com> (raw)
In-Reply-To: <20100326000405.758579387@linutronix.de>
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@google.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
next prev parent reply other threads:[~2010-05-25 20:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 0:06 [patch 0/2] Run interrupt handlers always with interrupts disabled Thomas Gleixner
2010-03-26 0:06 ` [patch 1/2] genirq: Run irq handlers " Thomas Gleixner
2010-03-26 6:13 ` Andi Kleen
2010-03-26 13:05 ` Thomas Gleixner
2010-03-30 5:33 ` Andi Kleen
2010-03-31 11:16 ` Thomas Gleixner
2010-04-02 9:31 ` Pavel Machek
2010-04-02 20:42 ` Thomas Gleixner
2010-04-02 21:09 ` Pavel Machek
2010-04-02 21:31 ` Peter Zijlstra
2010-04-02 22:51 ` Thomas Gleixner
2010-04-03 4:45 ` Pavel Machek
2010-04-03 4:45 ` Pavel Machek
2010-05-25 20:32 ` Venkatesh Pallipadi [this message]
2010-03-26 0:06 ` [patch 2/2] genirq: Remove IRQF_DISABLED from core code Thomas Gleixner
2010-03-26 0:06 ` Thomas Gleixner
2010-03-26 6:20 ` Andi Kleen
2010-03-26 11:19 ` Thomas Gleixner
2010-03-26 11:19 ` Thomas Gleixner
2010-03-26 3:34 ` [patch 0/2] Run interrupt handlers always with interrupts disabled David Miller
2010-03-26 8:14 ` Russell King
2010-03-26 8:14 ` Russell King
2010-03-26 9:20 ` Ingo Molnar
2010-03-26 9:20 ` Ingo Molnar
2010-03-26 9:28 ` Peter Zijlstra
2010-03-26 12:02 ` Jamie Lokier
2010-03-26 9:59 ` Alan Cox
2010-03-26 10:08 ` Peter Zijlstra
2010-03-26 10:12 ` Andi Kleen
2010-03-26 10:53 ` Ingo Molnar
2010-03-26 12:00 ` Nicolas Pitre
2010-03-26 12:06 ` Jamie Lokier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274819573-18977-1-git-send-email-venki@google.com \
--to=venki@google.com \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=gregkh@suse.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).