lkml.org 
[lkml]   [2007]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bug in on_each_cpu?
Andrew Morton wrote:
> The handler for smp_call_function() is called with local interrupts
> disabled (from the IPI handler).
>
> So to provide a consistent call environment for that handler, on_each_cpu()
> will also disable local interrupts when making the direct call on this CPU.
>
> Similarly the !CONFIG_SMP version of on_each_cpu() disables local
> interrupts when running the caller's function.
>

Yes, that is sensible. Something akin to on_each_cpu(synchronize_tscs)
would certainly not like interrupts coming in. Similarly, acpi_nmi
disable and probably rcu barriers as well. The irq disable here can
very validly be used as a barrier, but trying to ensure preserved shared
state with irq handlers over the call is a bug.

If one had all the spare time in the world, a new "sense" of irq disable
that communicated this fact would be nice from a static or dynamic
checking perspective.

Zach

------
sutra I.1 - atha linushasaanam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-01 21:35    [W:0.053 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site