From: Matthew Wilcox <matthew@wil.cx>
To: Jamie Lokier <jamie@shareable.org>
Cc: David Howells <dhowells@redhat.com>,
Russell King <rmk@arm.linux.org.uk>,
Yinghai Lu <yinghai@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Rabin Vincent <rabin@rab.in>, lkml <linux-kernel@vger.kernel.org>,
hpa@zytor.com, penberg@cs.helsinki.fi, cl@linux-foundation.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-arch@vger.kernel.org
Subject: Re: start_kernel(): bug: interrupts were enabled early
Date: Thu, 1 Apr 2010 05:23:52 -0600 [thread overview]
Message-ID: <20100401112352.GB20577@parisc-linux.org> (raw)
In-Reply-To: <20100401094111.GB29433@shareable.org>
On Thu, Apr 01, 2010 at 10:41:11AM +0100, Jamie Lokier wrote:
> David Howells wrote:
> > Russell King <rmk@arm.linux.org.uk> wrote:
> > > We use the standard generic kernel implementation. Is x86 different? ;)
> >
> > The optimised fast paths used on x86 rwsems don't disable interrupts.
>
> Any reason not to use the same technique for all the archs - plus the
> trick used in arch/armkernel/entry-armv.S:__kuser_cmpxchg for those
> archs which don't have atomic instructions or ll/sc?
Assuming you're talking about the __LINUX_ARM_ARCH__ < 6 + CONFIG_MMU
case, then this only works for uniprocessor machines.
> If the problem here is _only_ semaphores, and the above might make
> semaphores faster anyway, perhaps it's a solution.
You trade off a bit of overhead in the semaphore path for a bit of
overhead in the interrupt path. We probably take more sempahores than
we do interrupts, so it's probably worthwhile. Still, cmpxchg() needs
to be SMP-safe.
Realistically, this isn't something that can be done in generic code.
It has to be done in arch-specific code.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2010-04-01 11:23 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 19:41 start_kernel(): bug: interrupts were enabled early Rabin Vincent
2010-03-31 20:40 ` Andrew Morton
2010-03-31 20:47 ` Yinghai Lu
2010-03-31 20:52 ` Andrew Morton
2010-03-31 21:12 ` H. Peter Anvin
2010-03-31 21:28 ` Andrew Morton
2010-03-31 22:35 ` Benjamin Herrenschmidt
2010-04-01 16:13 ` Linus Torvalds
2010-04-01 14:27 ` Andrew Morton
2010-04-01 20:12 ` Linus Torvalds
2010-04-02 14:46 ` David Howells
2010-04-02 14:54 ` Linus Torvalds
2010-04-07 19:09 ` Kevin Hilman
2010-04-07 19:09 ` Kevin Hilman
2010-04-08 15:55 ` Américo Wang
2010-04-08 15:55 ` Américo Wang
2010-03-31 21:01 ` Matthew Wilcox
2010-03-31 21:05 ` H. Peter Anvin
2010-03-31 21:17 ` Matthew Wilcox
2010-03-31 21:42 ` Christoph Lameter
2010-03-31 21:54 ` Russell King
2010-03-31 21:57 ` H. Peter Anvin
2010-03-31 21:57 ` H. Peter Anvin
2010-03-31 22:30 ` Russell King
2010-03-31 22:37 ` Benjamin Herrenschmidt
2010-03-31 22:49 ` Andrew Morton
2010-04-01 1:17 ` Benjamin Herrenschmidt
2010-03-31 22:26 ` Andrew Morton
2010-04-01 6:26 ` H. Peter Anvin
2010-04-01 3:33 ` Andrew Morton
2010-04-01 6:48 ` Benjamin Herrenschmidt
2010-04-01 11:06 ` David Howells
2010-04-01 15:55 ` Christoph Lameter
2010-04-01 23:00 ` Benjamin Herrenschmidt
2010-04-01 16:15 ` H. Peter Anvin
2010-04-01 6:50 ` Benjamin Herrenschmidt
2010-03-31 22:36 ` Benjamin Herrenschmidt
2010-04-01 15:57 ` Christoph Lameter
2010-03-31 21:05 ` Russell King
2010-03-31 21:08 ` H. Peter Anvin
2010-03-31 21:08 ` H. Peter Anvin
2010-03-31 22:58 ` David Howells
2010-04-01 9:41 ` Jamie Lokier
2010-04-01 10:50 ` David Howells
2010-04-01 11:23 ` Matthew Wilcox [this message]
2010-03-31 22:31 ` Benjamin Herrenschmidt
2010-03-31 22:36 ` H. Peter Anvin
-- strict thread matches above, loose matches on Subject: below --
2006-10-18 15:50 Martin Michlmayr
2006-10-18 16:51 ` mlachwani
2006-10-18 18:14 ` Ralf Baechle
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=20100401112352.GB20577@parisc-linux.org \
--to=matthew@wil.cx \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=cl@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=hpa@zytor.com \
--cc=jamie@shareable.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=rabin@rab.in \
--cc=rmk@arm.linux.org.uk \
--cc=yinghai@kernel.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.