lkml.org 
[lkml]   [2011]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] proc/softirqs: only show state for online cpus
Date
Like /proc/interrupts, no need to output data for nobody.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Keika Kobayashi <kobayashi.kk@ncos.nec.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
fs/proc/softirqs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c
index 62604be..2b32b46 100644
--- a/fs/proc/softirqs.c
+++ b/fs/proc/softirqs.c
@@ -11,13 +11,13 @@ static int show_softirqs(struct seq_file *p, void *v)
int i, j;

seq_puts(p, " ");
- for_each_possible_cpu(i)
+ for_each_online_cpu(i)
seq_printf(p, "CPU%-8d", i);
seq_putc(p, '\n');

for (i = 0; i < NR_SOFTIRQS; i++) {
seq_printf(p, "%12s:", softirq_to_name[i]);
- for_each_possible_cpu(j)
+ for_each_online_cpu(j)
seq_printf(p, " %10u", kstat_softirqs_cpu(i, j));
seq_putc(p, '\n');
}
--
1.7.4.1


\
 
 \ /
  Last update: 2011-07-25 15:13    [W:0.156 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site