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-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, kobayashi.kk@ncos.nec.co.jp,
	heiko.carstens@de.ibm.com
Subject: Re: [PATCH 1/2] proc/insterrupts: make it cpu hotplug safe
Date: Wed, 27 Jul 2011 14:55:18 +0900	[thread overview]
Message-ID: <4E2FA846.6000305@jp.fujitsu.com> (raw)
In-Reply-To: <CAM2zO=AiGqbyna8NeC8PZxGBJzHokLKyixE6wv6nac3-OjzcWQ@mail.gmail.com>

(2011/07/27 14:47), Yong Zhang wrote:
> 2011/7/27 KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>:
>> (2011/07/27 13:56), Yong Zhang wrote:
>>> KOSAKI Motonhiro noticed that the reader of /proc/interrupts
>>> could be preempted by cpu hotplug, thus the reader can get
>>> broken result due to show_interrupts() iterate every online
>>> cpu without any protection.
>>>
>>> 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>
>>> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
>>
>> Looks good. but I have a question. On last thread, kobayashi-san
>> suggested to use for_each_possible_cpu() and you wrote "+1".
> 
> Yeah, for_each_possible_cpu() will make code more cleaner.
> so I give it my support.
> 
>>
>>>> At that time, I suggested to change
>>>> from for_each_online_cpu() to for_each_possible_cpu(),
>>>> in /proc/interrupts.
>>> +1
>>> Thus we could also avoid the issue pointed by KOSAKI Motonhiro.
>>
>> Why do you decide to use another way?
> 
> But, as kobayashi-san has also said:
> In conclusion, we decided to remain /proc/interrupts.
> because it had been the way for a long time.
> 
> So I don't want to raise an argument again :)

Fair enough. thanks.

	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>




  reply	other threads:[~2011-07-27  5:55 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
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 [this message]
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=4E2FA846.6000305@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kobayashi.kk@ncos.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@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