lkml.org 
[lkml]   [2011]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] proc/insterrupts: make it cpu hotplug safe
(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".

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




\
 
 \ /
  Last update: 2011-07-27 07:23    [W:0.537 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site