public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@cambridge.redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: dhowells@redhat.com, "David S. Miller" <davem@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [andrea@suse.de: Re: generic rwsem [Re: Alpha "process table hang"]]
Date: Fri, 20 Apr 2001 09:23:47 +0100	[thread overview]
Message-ID: <24526.987755027@warthog.cambridge.redhat.com> (raw)
In-Reply-To: Message from Linus Torvalds <torvalds@transmeta.com>  of "Thu, 19 Apr 2001 23:23:15 PDT." <Pine.LNX.4.31.0104192315480.4357-100000@penguin.transmeta.com>

Linus Torvalds <torvalds@transmeta.com> wrote:
> I think Andrea is right. Although this file seems to be entirely
> old-fashioned and should never be used, right?

I presume you're talking about "include/asm-i386/rwsem-spin.h"... If so,
Andrea is right, there is a bug in it (repeated a number of times), though why
the tests succeeded, I'm not sure.

The file should only be used for the 80386 and maybe early 80486's where
CMPXCHG doesn't work properly, everything above that can use the XADD
implementation.

> Also, I _really_ don't see why the code is inlined at all (in the real
> <linux/rwsem-spinlock.h>. It shouldn't be. It should be a real function
> call, and all be done inside lib/rwsem.c inside a
> 
> 	#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
> 
> or whatever.

Andrea seems to have changed his mind on the non-inlining in the generic case.

But if you want it totally non-inline, then that can be done. However, whilst
developing it, I did notice that that slowed things down, hence why I wanted
it kept in line.

I have some ideas on how to improve efficiency in that one anyway, based on
some a comment from Alan Cox.

> Please either set me straight, or send me a patch to remove
> asm-i386/rwsem-spin.h and fix up linux/rwsem-spinlock.h. Ok?

I think there are two seperate issues here:

  (1) asm-i386/rwsem-spin.h is wrong, and can probably be replaced with the
      generic spinlock implementation without inconveniencing people much.
      (though someone has commented that they'd want this to be inline as
       cycles are precious on the slow 80386).

  (2) "fix up linux/rwsem-spinlock.h": do you want the whole generic spinlock
      implementation made non-inline then?

David

       reply	other threads:[~2001-04-20  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.31.0104192315480.4357-100000@penguin.transmeta.com>
2001-04-20  8:23 ` David Howells [this message]
2001-04-20 17:46   ` [andrea@suse.de: Re: generic rwsem [Re: Alpha "process table hang"]] Linus Torvalds
2001-04-25 13:20     ` Jamie Lokier
2001-04-20 18:58   ` 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=24526.987755027@warthog.cambridge.redhat.com \
    --to=dhowells@cambridge.redhat.com \
    --cc=davem@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox