From: Dave Jones <davej@redhat.com>
To: Keith Owens <kaos@ocs.com.au>
Cc: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: Re: [DOCUMENTATION] Revised Unreliable Kernel Locking Guide
Date: Fri, 12 Dec 2003 18:25:56 +0000 [thread overview]
Message-ID: <20031212182556.GB10584@redhat.com> (raw)
In-Reply-To: <4939.1071246352@ocs3.intra.ocs.com.au>
On Sat, Dec 13, 2003 at 03:25:52AM +1100, Keith Owens wrote:
> On Fri, 12 Dec 2003 15:44:01 +0000,
> Dave Jones <davej@redhat.com> wrote:
> > Might be worth mentioning in the Per-CPU data section that code doing
> >operations on CPU registers (MSRs and the like) needs to be protected
> >by an explicit preempt_disable() / preempt_enable() pair if it's doing
> >operations that it expects to run on a specific CPU.
>
> Also calls to smp_call_function() need to be wrapped in preempt_disable,
> plus any work that is done on the current cpu before/after calling a
> function on the other cpus. Lack of preempt disable could result in
> the operation being done twice on one cpu and not at all on another.
And where you want to do the same thing on every processor, there's a
handy on_each_cpu() which takes care of this for you.
Dave
next prev parent reply other threads:[~2003-12-12 18:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-12 5:24 [DOCUMENTATION] Revised Unreliable Kernel Locking Guide Rusty Russell
2003-12-12 15:44 ` Dave Jones
2003-12-12 16:25 ` Keith Owens
2003-12-12 18:25 ` Dave Jones [this message]
2003-12-13 0:28 ` Keith Owens
2003-12-12 21:05 ` Rob Love
2003-12-15 2:28 ` Rusty Russell
2003-12-12 19:35 ` Paul E. McKenney
2003-12-13 3:16 ` Zwane Mwaikambo
2003-12-15 5:17 ` Rusty Russell
2003-12-15 5:17 ` Rusty Russell
2003-12-15 22:22 ` Paul E. McKenney
2003-12-16 6:32 ` Rusty Russell
2003-12-13 3:15 Manfred Spraul
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=20031212182556.GB10584@redhat.com \
--to=davej@redhat.com \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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;
as well as URLs for NNTP newsgroup(s).