linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Korty <joe.korty@ccur.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	mingo@elte.hu, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: Define __raw_read_lock etc for uniprocessor builds
Date: Tue, 24 Jan 2006 13:59:03 -0500	[thread overview]
Message-ID: <20060124185903.GA16565@tsunami.ccur.com> (raw)
In-Reply-To: <1138128156.2977.73.camel@laptopd505.fenrus.org>

On Tue, Jan 24, 2006 at 07:42:36PM +0100, Arjan van de Ven wrote:
> On Tue, 2006-01-24 at 13:38 -0500, Joe Korty wrote:
> > On Tue, Jan 24, 2006 at 07:32:02PM +0100, Arjan van de Ven wrote:
> > > On Tue, 2006-01-24 at 13:29 -0500, Joe Korty wrote:
> > > > On Tue, Jan 24, 2006 at 06:17:12PM +0000, Christoph Hellwig wrote:
> > > > > On Tue, Jan 24, 2006 at 01:09:54PM -0500, Joe Korty wrote:
> > > > > > 
> > > > > > Make NOPed versions of __raw_read_lock and family available
> > > > > > under uniprocessor kernels.
> > > > > > 
> > > > > > Discovered when compiling a uniprocessor kernel with the
> > > > > > fusyn patch applied.
> > > > > > 
> > > > > > The standard kernel does not use __raw_read_lock etc
> > > > > > outside of spinlock.c, which may account for this bug
> > > > > > being undiscovered until now.
> > > > > 
> > > > > No one should call these directly.   Please fix your odd patch instead.
> > > > 
> > > > Actually the patch calls the _raw version which is #defined to the __raw
> > > > version.  So it is doing the correct thing.
> > > 
> > > no it's not, it has no business calling the _raw version either.
> > 
> > Nope.
> > 
> > 1) The _raw_spin_lock family is used everywhere in the kernel.  
> 
> no it's not. It's used in a few very special architecture places, and in
> the spinlock.c code, and in one place of the scheduler, which is
> arguably special.
> 
> I don't know what kernel you're looking at.. but it's not a kernel.org
> one.
> 
> 
> > 2) The _raw versions are intended to be used in places where it is
> > known that preemption is already disabled, so that the overhead of
> > re-disabling/enabling it can be avoided.
> 
> that's not true either. If it was, then the name would have been
> different.

I'll leave it to Ingo to decide.  After all, the NOPed versions are in the
tree already and have been for some time.  They just are under the wrong
#ifdef, so it seems like it was his intent to provide it, but failed to
do so in a way that actually enabled them.

(and '_raw'  is a perfect prefix for the core spinlock services).

Joe

  reply	other threads:[~2006-01-24 18:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-24 18:09 Define __raw_read_lock etc for uniprocessor builds Joe Korty
2006-01-24 18:17 ` Christoph Hellwig
2006-01-24 18:29   ` Joe Korty
2006-01-24 18:32     ` Arjan van de Ven
2006-01-24 18:38       ` Joe Korty
2006-01-24 18:42         ` Arjan van de Ven
2006-01-24 18:59           ` Joe Korty [this message]
2006-01-24 21:05           ` Ingo Molnar
2006-01-24 21:12 ` Ingo Molnar

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=20060124185903.GA16565@tsunami.ccur.com \
    --to=joe.korty@ccur.com \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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).