From: Zachary Amsden <zach@vmware.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Daniel Hecht <dhecht@vmware.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Bug in on_each_cpu?
Date: Thu, 01 Mar 2007 12:31:33 -0800 [thread overview]
Message-ID: <45E73825.30800@vmware.com> (raw)
In-Reply-To: <20070301072225.9f00c36c.akpm@linux-foundation.org>
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
next prev parent reply other threads:[~2007-03-01 20:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <45E6AC1A.8050608@vmware.com>
[not found] ` <20070301024524.c7c8ea1a.akpm@linux-foundation.org>
2007-03-01 11:34 ` Bug in on_each_cpu? Zachary Amsden
2007-03-01 11:41 ` Rusty Russell
2007-03-01 11:47 ` Zachary Amsden
2007-03-01 15:22 ` Andrew Morton
2007-03-01 20:31 ` Zachary Amsden [this message]
2007-03-02 4:46 ` Ernie Petrides
2007-03-01 15:28 ` Andrew Morton
2007-03-01 20:03 ` Zachary Amsden
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=45E73825.30800@vmware.com \
--to=zach@vmware.com \
--cc=akpm@linux-foundation.org \
--cc=dhecht@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.