All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: "David S. Miller" <davem@redhat.com>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, riel@conectiva.com.br, wli@holomorphy.com
Subject: Re: [PATCH] generalized spin_lock_bit
Date: 20 Jul 2002 15:46:14 -0700	[thread overview]
Message-ID: <1027205175.1116.830.camel@sinai> (raw)
In-Reply-To: <20020720.152703.102669295.davem@redhat.com>

On Sat, 2002-07-20 at 15:27, David S. Miller wrote:
>    From: Robert Love <rml@tech9.net>
>    Date: 20 Jul 2002 13:21:51 -0700
>    
>    Thanks to Christoph Hellwig for prodding to make it per-architecture,
>    Ben LaHaise for the loop optimization, and William Irwin for the
>    original bit locking.
> 
> Just note that the implementation of these bit spinlocks will be
> extremely expensive on some platforms that lack "compare and swap"
> type instructions (or something similar like "load locked, store
> conditional" as per mips/alpha).

That is what they do use, but the code is pushed into the architecture
headers so you can do something else if you choose.

I originally just had a single generic version, but people representing
the greater good of SPARC and PA-RISC argued otherwise.  It should be
simple enough to just paste the generic implementations into your
asm/spinlock.h if you do not want to do any hand-tuning.

	Robert Love


WARNING: multiple messages have this Message-ID (diff)
From: Robert Love <rml@tech9.net>
To: "David S. Miller" <davem@redhat.com>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, riel@conectiva.com.br, wli@holomorphy.com
Subject: Re: [PATCH] generalized spin_lock_bit
Date: 20 Jul 2002 15:46:14 -0700	[thread overview]
Message-ID: <1027205175.1116.830.camel@sinai> (raw)
In-Reply-To: <20020720.152703.102669295.davem@redhat.com>

On Sat, 2002-07-20 at 15:27, David S. Miller wrote:
>    From: Robert Love <rml@tech9.net>
>    Date: 20 Jul 2002 13:21:51 -0700
>    
>    Thanks to Christoph Hellwig for prodding to make it per-architecture,
>    Ben LaHaise for the loop optimization, and William Irwin for the
>    original bit locking.
> 
> Just note that the implementation of these bit spinlocks will be
> extremely expensive on some platforms that lack "compare and swap"
> type instructions (or something similar like "load locked, store
> conditional" as per mips/alpha).

That is what they do use, but the code is pushed into the architecture
headers so you can do something else if you choose.

I originally just had a single generic version, but people representing
the greater good of SPARC and PA-RISC argued otherwise.  It should be
simple enough to just paste the generic implementations into your
asm/spinlock.h if you do not want to do any hand-tuning.

	Robert Love

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

  reply	other threads:[~2002-07-20 22:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-20 20:21 [PATCH] generalized spin_lock_bit Robert Love
2002-07-20 20:21 ` Robert Love
2002-07-20 20:40 ` Linus Torvalds
2002-07-20 20:40   ` Linus Torvalds
2002-07-20 21:15   ` William Lee Irwin III
2002-07-20 21:15     ` William Lee Irwin III
2002-07-20 21:19     ` Robert Love
2002-07-20 21:19       ` Robert Love
2002-07-20 21:20   ` Robert Love
2002-07-20 21:20     ` Robert Love
2002-07-20 23:25     ` Linus Torvalds
2002-07-20 23:25       ` Linus Torvalds
2002-07-20 22:27 ` David S. Miller
2002-07-20 22:27   ` David S. Miller
2002-07-20 22:46   ` Robert Love [this message]
2002-07-20 22:46     ` Robert Love
2002-07-21  0:26   ` Alan Cox
2002-07-21  0:26     ` Alan Cox
2002-07-21  1:31     ` David S. Miller
2002-07-21  1:31       ` David S. Miller
2002-07-21 13:48       ` Alan Cox
2002-07-21 13:48         ` Alan Cox

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=1027205175.1116.830.camel@sinai \
    --to=rml@tech9.net \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    --cc=wli@holomorphy.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.