All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	"D . W . Howells" <dhowells@astarte.free-online.co.uk>,
	dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: x86 rwsem in 2.4.4pre[234] are still buggy [was Re: rwsem benchmarks [Re: generic rwsem [Re: Alpha "process table hang"]]]
Date: Sat, 21 Apr 2001 16:29:26 +0200	[thread overview]
Message-ID: <20010421162926.D17757@athlon.random> (raw)
In-Reply-To: <20010420191710.A32159@athlon.random> <Pine.LNX.4.31.0104201639070.6299-100000@penguin.transmeta.com> <20010421160327.A17757@athlon.random> <20010421151737.A7576@flint.arm.linux.org.uk>
In-Reply-To: <20010421151737.A7576@flint.arm.linux.org.uk>; from rmk@arm.linux.org.uk on Sat, Apr 21, 2001 at 03:17:37PM +0100

On Sat, Apr 21, 2001 at 03:17:37PM +0100, Russell King wrote:
> On Sat, Apr 21, 2001 at 04:03:27PM +0200, Andrea Arcangeli wrote:
> > On Fri, Apr 20, 2001 at 04:45:32PM -0700, Linus Torvalds wrote:
> > > I would suggest the following:
> > > 
> > >  - the generic semaphores should use the lock that already exists in the
> > >    wait-queue as the semaphore spinlock.
> > 
> > Ok, that is what my generic code does.
> 
> Erm, spin_lock()?  What if up_read or up_write gets called from interrupt
> context (is this allowed)?

That it is allowed by my generic code that does spin_lock_irq in down_* and
spin_lock_irqsave in up_* but it's disallowed by the weaker semantics of the
generic and x86 semaphores 2.4.4pre[2345] (or + David's last patch).

> If these are now allowed, then maybe we should either consider getting
> the Stanford checker to check for this, or else we ought to do a debugging
> if (in_interupt()) BUG(); thing.

Caller bug is the last of my worries. (and I seriously doubt that if somebody
doesn't know the semantics of the rwsem, he will care to enable the debugging
checks during regression testing ;)

Andrea

  reply	other threads:[~2001-04-21 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-19 23:28 rwsem benchmarks [Re: generic rwsem [Re: Alpha "process table hang"]] D.W.Howells
2001-04-20  1:42 ` Andrea Arcangeli
2001-04-20 10:10   ` David Howells
2001-04-20 17:17   ` x86 rwsem in 2.4.4pre[234] are still buggy [was Re: rwsem benchmarks [Re: generic rwsem [Re: Alpha "process table hang"]]] Andrea Arcangeli
2001-04-20 23:45     ` Linus Torvalds
2001-04-21 14:03       ` Andrea Arcangeli
2001-04-21 14:17         ` Russell King
2001-04-21 14:29           ` Andrea Arcangeli [this message]
2001-04-21 14:37             ` rmk
2001-04-21 15:04               ` Andrea Arcangeli
2001-04-21 17:18           ` Linus Torvalds
2001-04-21 14:37         ` Russell King
2001-04-21 15:07           ` Andrea Arcangeli

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=20010421162926.D17757@athlon.random \
    --to=andrea@suse.de \
    --cc=dhowells@astarte.free-online.co.uk \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@transmeta.com \
    /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.