From: Lee Revell <rlrevell@joe-job.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Zwane Mwaikambo <zwane@linuxpower.ca>,
Dominik Brodowski <linux@dominikbrodowski.de>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [CPU-HOTPLUG] convert cpucontrol to be a rwsem
Date: Tue, 02 Nov 2004 09:54:22 -0500 [thread overview]
Message-ID: <1099407263.1563.4.camel@krustophenia.net> (raw)
In-Reply-To: <1099352903.20402.2.camel@localhost.localdomain>
On Tue, 2004-11-02 at 10:48 +1100, Rusty Russell wrote:
> On Mon, 2004-11-01 at 13:04 -0500, Lee Revell wrote:
> > On Mon, 2004-11-01 at 07:00 -0700, Zwane Mwaikambo wrote:
> > > Agreed it makes a lot more sense, i think there could be some places where
> > > we use preempt_disable to protect against cpu offline which could
> > > converted, but that can come later.
> > >
> >
> > You know I picked up Robert Love's book the other day and was surprised
> > to read we are not supposed to be using preempt_disable, there is a
> > per_cpu interface for exactly this kind of thing. Which is currently
> > recommended?
>
> get_cpu() both ensures that this CPU won't go down, and ensures we won't
> get scheduled off it. It returns the current processor ID, as well.
> put_cpu() puts the CPU back.
>
> In my experience it's usually clearer than preempt_disable().
To answer Zwane's earlier question, Love's book covers this on page 136,
then all of Appendix B. I also completely missed this the first time...
Lee
next prev parent reply other threads:[~2004-11-02 15:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-01 8:43 [PATCH] [CPU-HOTPLUG] convert cpucontrol to be a rwsem Dominik Brodowski
2004-11-01 9:05 ` Nick Piggin
2004-11-01 14:00 ` Zwane Mwaikambo
2004-11-01 18:04 ` Lee Revell
2004-11-01 23:48 ` Rusty Russell
2004-11-02 14:54 ` Lee Revell [this message]
2004-11-02 0:16 ` Zwane Mwaikambo
2004-11-02 22:28 ` Dominik Brodowski
2004-11-04 1:57 ` Rusty Russell
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=1099407263.1563.4.camel@krustophenia.net \
--to=rlrevell@joe-job.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.de \
--cc=rusty@rustcorp.com.au \
--cc=zwane@linuxpower.ca \
/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.