From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4E2FA846.6000305@jp.fujitsu.com> Date: Wed, 27 Jul 2011 14:55:18 +0900 From: KOSAKI Motohiro MIME-Version: 1.0 Subject: Re: [PATCH 1/2] proc/insterrupts: make it cpu hotplug safe References: <20110726163424.GC2576@osiris.boeblingen.de.ibm.com> <1311742583-18633-1-git-send-email-yong.zhang0@gmail.com> <4E2FA002.2020302@jp.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: 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 List-ID: (2011/07/27 14:47), Yong Zhang wrote: > 2011/7/27 KOSAKI Motohiro : >> (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 >>> Cc: Andrew Morton >>> Cc: Keika Kobayashi >>> Cc: KOSAKI Motohiro >>> Cc: Heiko Carstens >> >> 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