linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tan Hu <tan.hu@zte.com.cn>
To: adobriyan@gmail.com
Cc: zhong.weidong@zte.com.cn, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH] proc: only export statistics of softirqs for online cpus
Date: Thu, 10 Jan 2019 19:24:01 +0800	[thread overview]
Message-ID: <1547119441-28314-1-git-send-email-tan.hu@zte.com.cn> (raw)

Only export statistics of softirqs for online cpus like
/proc/interrupts, it would be more clearly.

Signed-off-by: Tan Hu <tan.hu@zte.com.cn>
---
 fs/proc/softirqs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c
index 12901dc..b7e6a0f 100644
--- a/fs/proc/softirqs.c
+++ b/fs/proc/softirqs.c
@@ -12,13 +12,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.8.3.1

             reply	other threads:[~2019-01-10 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 11:24 Tan Hu [this message]
2019-01-10 11:24 ` [PATCH] proc: only export statistics of softirqs for online cpus Tan Hu
2019-01-11 23:03 ` Alexey Dobriyan
2019-01-11 23:03   ` Alexey Dobriyan

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=1547119441-28314-1-git-send-email-tan.hu@zte.com.cn \
    --to=tan.hu@zte.com.cn \
    --cc=adobriyan@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhong.weidong@zte.com.cn \
    /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).