public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: yong.zhang0@gmail.com
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	kobayashi.kk@ncos.nec.co.jp
Subject: Re: [PATCH] proc/softirqs: only show state for online cpus
Date: Tue, 26 Jul 2011 14:28:31 +0900	[thread overview]
Message-ID: <4E2E507F.7030607@jp.fujitsu.com> (raw)
In-Reply-To: <1311599418-1915-1-git-send-email-yong.zhang0@gmail.com>

> 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>

If the cpu never be onlined, its statistics always 0. Then, it definitely
no value. In the other hand, if the cpu was offlined dynamically, we don't
know the user want to know the cpus's statistics or not.

Anyway, it's incompatibility change. I don't think this is valuable change.


> ---
>  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');
>  	}



  reply	other threads:[~2011-07-26  5:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 13:10 [PATCH] proc/softirqs: only show state for online cpus Yong Zhang
2011-07-26  5:28 ` KOSAKI Motohiro [this message]
2011-07-26  6:14   ` Yong Zhang
2011-07-26  6:38     ` KOSAKI Motohiro
2011-07-26  7:29       ` Yong Zhang
2011-07-26  7:46         ` Keika Kobayashi
2011-07-26  7:56           ` Yong Zhang
2011-07-26  7:52         ` KOSAKI Motohiro
2011-07-26 16:34         ` Heiko Carstens
2011-07-27  2:41           ` Yong Zhang
2011-07-27  4:56           ` [PATCH 1/2] proc/insterrupts: make it cpu hotplug safe Yong Zhang
2011-07-27  4:56             ` [PATCH 2/2] [S390] irq: fix show_interrupts() vs cpu hotplug Yong Zhang
2011-07-27  6:06               ` Heiko Carstens
2011-07-27  5:20             ` [PATCH 1/2] proc/insterrupts: make it cpu hotplug safe KOSAKI Motohiro
2011-07-27  5:47               ` Yong Zhang
2011-07-27  5:55                 ` KOSAKI Motohiro
2011-07-27  6:05             ` Heiko Carstens

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=4E2E507F.7030607@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=kobayashi.kk@ncos.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yong.zhang0@gmail.com \
    /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