From: Ralf Baechle <ralf@oss.sgi.com>
To: Keith Owens <kaos@melbourne.sgi.com>
Cc: linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: Re: sysmips syscall
Date: Sat, 18 Nov 2000 15:13:28 +0100 [thread overview]
Message-ID: <20001118151328.B17046@bacchus.dhis.org> (raw)
In-Reply-To: <23098.974555179@ocs3.ocs-net>; from kaos@melbourne.sgi.com on Sun, Nov 19, 2000 at 12:46:19AM +1100
On Sun, Nov 19, 2000 at 12:46:19AM +1100, Keith Owens wrote:
> On Sat, 18 Nov 2000 11:59:09 +0100,
> Ralf Baechle <ralf@oss.sgi.com> wrote:
> >You can base a spinlock implementation on the fact that the register k0
> >will be left at a value != zero after any exception, also including context
> >switches.
> >
> >Problem: this solution breaks silently on multiproessor systems.
>
> Use Dekker's algorithm between systems. It requires cache coherent
> memory but does not need any inter cpu locking mechanisms.
>
> http://www.cs.wvu.edu/~jdm/classes/cs356/notes/mutex/Dekker.html
> describes the algorithm for the two cpu case. It assumes no preemption
> on each cpu so it has to be modified to handle interrupts. Add a local
> lock so you are the only code on this processor trying to use Dekker
> between processors.
We're talking about a algorithem to implement atomic operations only in
userspace. There is Dekker and few improved variants of it. They all
got in common that they're performing badly for an increasing number of
threads even for the no-contention case. And non-constant memory
requirements which would require further changes to glibc. So I consider
this whole family of algorithems to be a entirely theoretical construct.
Which is why we're thinking about those crude hacks.
Ralf
next prev parent reply other threads:[~2000-11-18 14:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-18 1:28 sysmips syscall rajesh.palani
2000-11-18 1:28 ` rajesh.palani
2000-11-18 10:59 ` Ralf Baechle
2000-11-18 13:46 ` Keith Owens
2000-11-18 14:13 ` Ralf Baechle [this message]
2000-11-18 17:26 ` Alan Cox
2000-11-18 17:26 ` 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=20001118151328.B17046@bacchus.dhis.org \
--to=ralf@oss.sgi.com \
--cc=kaos@melbourne.sgi.com \
--cc=linux-mips@fnet.fr \
--cc=linux-mips@oss.sgi.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