linux-mips-fnet
[Top] [All Lists]

Re: sysmips syscall

To: Ralf Baechle <ralf@oss.sgi.com>
Subject: Re: sysmips syscall
From: Keith Owens <kaos@melbourne.sgi.com>
Date: Sun, 19 Nov 2000 00:46:19 +1100
Cc: linux-mips@oss.sgi.com, linux-mips@fnet.fr
In-reply-to: Your message of "Sat, 18 Nov 2000 11:59:09 BST." <20001118115909.D8672@bacchus.dhis.org>
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.

<Prev in Thread] Current Thread [Next in Thread>