linux-mips
[Top] [All Lists]

Re: MIPS_ATOMIC_SET in sys_sysmips()

To: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Subject: Re: MIPS_ATOMIC_SET in sys_sysmips()
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Tue, 19 Dec 2000 19:03:00 +0100 (MET)
Cc: linux-mips@oss.sgi.com, Ralf Baechle <ralf@uni-koblenz.de>, Jun Sun <jsun@mvista.com>
In-reply-to: <XFMail.001219180301.Harald.Koerfgen@home.ivm.de>
Organization: Technical University of Gdansk
Sender: owner-linux-mips@oss.sgi.com
On Tue, 19 Dec 2000, Harald Koerfgen wrote:

> Another possibility would be to rely on the userland ll/sc emulation in the
> kernel. The one in the linux-vr tree seems to be working well and can easily 
> be
> backported to Linux/MIPS.

 This should work but it looks ugly to me and the performance would suck
horribly. 

> Advantage: userland binary compatibility.
> Disadvantage: possibility for a lot of context switches for userland atomic
> operations.

 We may implement the emulation anyway, just like we emulate unaligned
accesses. 

> Having a sysmips(MIPS_ATOMIC_SET, ...) or atomic_op() solution would probably 
> a
> lot faster.
> 
> Maybe we should implement both :)

 If we could afford another syscall number then I would prefer atomic_op() 
at the moment as it is well-documented and it does not overload one
function for various purposes, i.e. it's a bit faster. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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